2025-07-05 15:14:36 +08:00
|
|
|
|
unit U_LLCKList;
|
|
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
|
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
|
|
|
|
|
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
|
|
|
|
|
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
|
|
|
|
|
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
|
|
|
|
|
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
|
|
|
|
|
|
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, cxButtonEdit,
|
|
|
|
|
|
cxDropDownEdit, cxPC, Buttons, cxTextEdit, cxLookAndFeels,
|
2025-08-19 17:40:03 +08:00
|
|
|
|
cxLookAndFeelPainters, cxNavigator, dxSkinsCore, dxSkinDarkRoom,
|
|
|
|
|
|
dxSkinOffice2013White, dxSkinSharpPlus, dxSkinSpringTime,
|
|
|
|
|
|
dxSkinsDefaultPainters, dxSkinscxPCPainter, dxSkinBlack, dxSkinBlue,
|
|
|
|
|
|
dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkSide,
|
|
|
|
|
|
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
|
|
|
|
|
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
|
|
|
|
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
|
|
|
|
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
|
|
|
|
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
|
|
|
|
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
|
|
|
|
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
|
|
|
|
|
dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSilver,
|
|
|
|
|
|
dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinValentine,
|
|
|
|
|
|
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue;
|
2025-07-05 15:14:36 +08:00
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
|
TfrmLLCKList = class(TForm)
|
|
|
|
|
|
ToolBar1: TToolBar;
|
|
|
|
|
|
TBRafresh: TToolButton;
|
|
|
|
|
|
TBFind: TToolButton;
|
|
|
|
|
|
TBAdd: TToolButton;
|
|
|
|
|
|
TBClose: TToolButton;
|
|
|
|
|
|
Tv1: TcxGridDBTableView;
|
|
|
|
|
|
cxGrid1Level1: TcxGridLevel;
|
|
|
|
|
|
cxGrid1: TcxGrid;
|
|
|
|
|
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
|
|
|
|
|
ADOQueryCmd: TADOQuery;
|
|
|
|
|
|
ADOQueryMain: TADOQuery;
|
|
|
|
|
|
ADOQueryTemp: TADOQuery;
|
2025-08-19 17:40:03 +08:00
|
|
|
|
DS_Main: TDataSource;
|
2025-07-05 15:14:36 +08:00
|
|
|
|
TBExport: TToolButton;
|
|
|
|
|
|
Order_Main: TClientDataSet;
|
|
|
|
|
|
ToolButton1: TToolButton;
|
|
|
|
|
|
Panel1: TPanel;
|
|
|
|
|
|
v1Column1: TcxGridDBColumn;
|
|
|
|
|
|
Label34: TLabel;
|
|
|
|
|
|
v1Column7: TcxGridDBColumn;
|
|
|
|
|
|
v1Column9: TcxGridDBColumn;
|
|
|
|
|
|
KHNameHZ: TEdit;
|
|
|
|
|
|
BegDate: TDateTimePicker;
|
|
|
|
|
|
EndDate: TDateTimePicker;
|
|
|
|
|
|
RM1: TRMGridReport;
|
|
|
|
|
|
RMDBMain: TRMDBDataSet;
|
|
|
|
|
|
RMXLSExport2: TRMXLSExport;
|
2025-08-19 17:40:03 +08:00
|
|
|
|
CDS_3: TClientDataSet;
|
2025-07-05 15:14:36 +08:00
|
|
|
|
v1Column17: TcxGridDBColumn;
|
|
|
|
|
|
v1Column5: TcxGridDBColumn;
|
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
|
MYName: TEdit;
|
|
|
|
|
|
v1Column3: TcxGridDBColumn;
|
|
|
|
|
|
v1Column2: TcxGridDBColumn;
|
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
|
Note: TEdit;
|
|
|
|
|
|
labMYType: TLabel;
|
|
|
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
|
|
|
N1: TMenuItem;
|
|
|
|
|
|
N2: TMenuItem;
|
|
|
|
|
|
CheckBox1: TCheckBox;
|
|
|
|
|
|
v1JCDanWeiJC: TcxGridDBColumn;
|
|
|
|
|
|
Label3: TLabel;
|
|
|
|
|
|
JCDanWeiJC: TEdit;
|
|
|
|
|
|
v1filler: TcxGridDBColumn;
|
|
|
|
|
|
Label4: TLabel;
|
|
|
|
|
|
filler: TEdit;
|
2025-08-19 17:40:03 +08:00
|
|
|
|
CDS_2: TClientDataSet;
|
2025-07-05 15:14:36 +08:00
|
|
|
|
v1Column4: TcxGridDBColumn;
|
|
|
|
|
|
v1Column10: TcxGridDBColumn;
|
|
|
|
|
|
Label5: TLabel;
|
|
|
|
|
|
MYTypeFlag: TComboBox;
|
|
|
|
|
|
v1Column11: TcxGridDBColumn;
|
|
|
|
|
|
v1Column12: TcxGridDBColumn;
|
|
|
|
|
|
Label6: TLabel;
|
|
|
|
|
|
MLOrderNo: TEdit;
|
|
|
|
|
|
Label7: TLabel;
|
|
|
|
|
|
KHNameHZZ: TEdit;
|
|
|
|
|
|
v1Column13: TcxGridDBColumn;
|
|
|
|
|
|
Tv1Column1: TcxGridDBColumn;
|
|
|
|
|
|
Label8: TLabel;
|
|
|
|
|
|
PBBatchNo: TEdit;
|
|
|
|
|
|
Tv1Column2: TcxGridDBColumn;
|
|
|
|
|
|
Tv1Column3: TcxGridDBColumn;
|
|
|
|
|
|
Tv1Column4: TcxGridDBColumn;
|
|
|
|
|
|
Tv1Column5: TcxGridDBColumn;
|
|
|
|
|
|
Label9: TLabel;
|
|
|
|
|
|
MYColor: TEdit;
|
|
|
|
|
|
Tv1Column6: TcxGridDBColumn;
|
2025-08-19 17:40:03 +08:00
|
|
|
|
PageControl1: TPageControl;
|
|
|
|
|
|
TabSheet1: TTabSheet;
|
|
|
|
|
|
cxGrid2: TcxGrid;
|
|
|
|
|
|
TV2: TcxGridDBTableView;
|
|
|
|
|
|
TV2Ssel: TcxGridDBColumn;
|
|
|
|
|
|
TV2KHName: TcxGridDBColumn;
|
|
|
|
|
|
TV2KHNo: TcxGridDBColumn;
|
|
|
|
|
|
TV2MYType: TcxGridDBColumn;
|
|
|
|
|
|
TV2PS: TcxGridDBColumn;
|
|
|
|
|
|
Tv2Qty: TcxGridDBColumn;
|
|
|
|
|
|
TV2KgQty: TcxGridDBColumn;
|
|
|
|
|
|
TV2Note: TcxGridDBColumn;
|
|
|
|
|
|
cxGridLevel1: TcxGridLevel;
|
|
|
|
|
|
TabSheet2: TTabSheet;
|
|
|
|
|
|
cxGrid3: TcxGrid;
|
|
|
|
|
|
TV3: TcxGridDBTableView;
|
|
|
|
|
|
TV3Ssel: TcxGridDBColumn;
|
|
|
|
|
|
TV3MLOrderNo: TcxGridDBColumn;
|
|
|
|
|
|
TV3KHCode: TcxGridDBColumn;
|
|
|
|
|
|
TV3KHName: TcxGridDBColumn;
|
|
|
|
|
|
TV3CRTime: TcxGridDBColumn;
|
|
|
|
|
|
TV3PBBatchNo: TcxGridDBColumn;
|
|
|
|
|
|
TV3GYSNo: TcxGridDBColumn;
|
|
|
|
|
|
TV3KHNameJC: TcxGridDBColumn;
|
|
|
|
|
|
TV3KHNameJCDH: TcxGridDBColumn;
|
|
|
|
|
|
TV3MYType: TcxGridDBColumn;
|
|
|
|
|
|
TV3MYName: TcxGridDBColumn;
|
|
|
|
|
|
TV3MYColor: TcxGridDBColumn;
|
|
|
|
|
|
TV3MYColorNo: TcxGridDBColumn;
|
|
|
|
|
|
TV3filler: TcxGridDBColumn;
|
|
|
|
|
|
TV3RCGangNo: TcxGridDBColumn;
|
|
|
|
|
|
TV3JH: TcxGridDBColumn;
|
|
|
|
|
|
TV3JKGQTY: TcxGridDBColumn;
|
|
|
|
|
|
TV3JMQTY: TcxGridDBColumn;
|
|
|
|
|
|
TV3MYMF: TcxGridDBColumn;
|
|
|
|
|
|
TV3MYKZ: TcxGridDBColumn;
|
|
|
|
|
|
TV3SJKZ: TcxGridDBColumn;
|
|
|
|
|
|
TV3Note: TcxGridDBColumn;
|
|
|
|
|
|
TV3RCColor: TcxGridDBColumn;
|
|
|
|
|
|
TV3ZKZT: TcxGridDBColumn;
|
|
|
|
|
|
TV3CDZSD: TcxGridDBColumn;
|
|
|
|
|
|
TV3KW: TcxGridDBColumn;
|
|
|
|
|
|
cxGridLevel2: TcxGridLevel;
|
|
|
|
|
|
TabSheet3: TTabSheet;
|
|
|
|
|
|
cxGrid4: TcxGrid;
|
|
|
|
|
|
TV4: TcxGridDBTableView;
|
|
|
|
|
|
TV4RCGangNo: TcxGridDBColumn;
|
|
|
|
|
|
TV4JH: TcxGridDBColumn;
|
|
|
|
|
|
TV4KgQty: TcxGridDBColumn;
|
|
|
|
|
|
TV4MQty: TcxGridDBColumn;
|
|
|
|
|
|
cxGridLevel4: TcxGridLevel;
|
|
|
|
|
|
ADOQuery3: TADOQuery;
|
|
|
|
|
|
ADOQuery2: TADOQuery;
|
|
|
|
|
|
DS_2: TDataSource;
|
|
|
|
|
|
DS_3: TDataSource;
|
|
|
|
|
|
DS_Sub: TDataSource;
|
|
|
|
|
|
CDS_Sub: TClientDataSet;
|
2025-07-05 15:14:36 +08:00
|
|
|
|
procedure FormDestroy(Sender: TObject);
|
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
|
procedure FormCreate(Sender: TObject);
|
|
|
|
|
|
procedure TBCloseClick(Sender: TObject);
|
|
|
|
|
|
procedure TBFindClick(Sender: TObject);
|
|
|
|
|
|
procedure TBExportClick(Sender: TObject);
|
|
|
|
|
|
procedure TBRafreshClick(Sender: TObject);
|
|
|
|
|
|
procedure TBAddClick(Sender: TObject);
|
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
|
procedure CheckBox1Click(Sender: TObject);
|
|
|
|
|
|
procedure CheckBox2Click(Sender: TObject);
|
|
|
|
|
|
procedure ToolButton1Click(Sender: TObject);
|
|
|
|
|
|
procedure CustomerNoNameChange(Sender: TObject);
|
|
|
|
|
|
procedure N2Click(Sender: TObject);
|
|
|
|
|
|
procedure N1Click(Sender: TObject);
|
|
|
|
|
|
procedure ZJStatusChange(Sender: TObject);
|
|
|
|
|
|
procedure Tv1DblClick(Sender: TObject);
|
|
|
|
|
|
procedure v1Column1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
|
|
|
|
|
procedure v1Column17CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
|
|
|
|
|
procedure v1Column3CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
2025-08-19 17:40:03 +08:00
|
|
|
|
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
2025-07-05 15:14:36 +08:00
|
|
|
|
private
|
|
|
|
|
|
FGXName: string;
|
|
|
|
|
|
DQdate: TDateTime;
|
|
|
|
|
|
procedure InitGrid();
|
|
|
|
|
|
procedure InitForm();
|
|
|
|
|
|
function DelData(): Boolean;
|
2025-08-19 17:40:03 +08:00
|
|
|
|
procedure InitGridByCustomer();
|
|
|
|
|
|
procedure InitMXGrid();
|
|
|
|
|
|
procedure InitSubGrid();
|
2025-07-05 15:14:36 +08:00
|
|
|
|
{ Private declarations }
|
|
|
|
|
|
public
|
|
|
|
|
|
FFInt, FCloth: Integer;
|
|
|
|
|
|
canshu1: string;
|
|
|
|
|
|
|
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
|
frmLLCKList: TfrmLLCKList;
|
|
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
|
U_DataLink, U_RTFun, U_ZDYHelp, U_LLCKInPut;
|
|
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.FormDestroy(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
frmLLCKList := nil;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
|
begin
|
|
|
|
|
|
Action := caFree;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.FormCreate(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
cxgrid1.Align := alClient;
|
|
|
|
|
|
canshu1 := Trim(DParameters1);
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.TBCloseClick(Sender: TObject);
|
|
|
|
|
|
begin
|
2025-08-22 09:38:54 +08:00
|
|
|
|
WriteCxGrid('<27>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', Tv1, 'ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
WriteCxGrid('<27>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӱ<EFBFBD>', TV4, 'ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
WriteCxGrid('<27>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>', TV2, 'ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
WriteCxGrid('<27>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD><CFB8>', TV3, 'ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
2025-07-05 15:14:36 +08:00
|
|
|
|
Close;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.InitGrid();
|
|
|
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
|
|
|
ADOQueryMain.DisableControls;
|
|
|
|
|
|
with ADOQueryMain do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Filtered := False;
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('select AA.* ');
|
|
|
|
|
|
sql.Add(',KHNameHZ=dbo.getpinyin(isnull(AA.KHNameJC,''''))+AA.GYSNo+isnull(AA.KHNameJC,'''')');
|
|
|
|
|
|
sql.Add('from(');
|
|
|
|
|
|
sql.Add(' select A.* ');
|
|
|
|
|
|
sql.Add(',KHNameJC=(select Top 1 B.KHNameJC from KH_Main B ');
|
|
|
|
|
|
sql.Add(' where isnull(B.KHFlag,'''')=''GYS'' and isnull(B.Valid,'''')=''Y'' and B.KHNO=A.GYSNo)');
|
|
|
|
|
|
sql.Add(',KHNameJCDH=(select Top 1 B.KHNameJC from KH_Main B ');
|
|
|
|
|
|
sql.Add(' where isnull(B.KHFlag,'''')=''GYS'' and isnull(B.Valid,'''')=''Y'' and B.KHNO=A.ToGYSNo)');
|
|
|
|
|
|
sql.Add(',KHNameHZZ=dbo.getpinyin(isnull(KM.KHNameJC,''''))+B.KHNO+isnull(KM.KHNameJC,'''')');
|
|
|
|
|
|
sql.Add(',KHNameJCZ=KM.KHNameJC,B.MLOrderNo,KHNOKH=B.KHNO');
|
|
|
|
|
|
sql.Add(' from CK_MYSC_CR A ');
|
|
|
|
|
|
sql.Add(' left join ML_OrderMainNew B on A.MainId=B.NewMLID');
|
|
|
|
|
|
sql.Add(' left join KH_Main KM on KM.KHNO=B.KHNO ');
|
|
|
|
|
|
sql.Add(' where 1=1 ');
|
|
|
|
|
|
if CheckBox1.Checked = False then
|
|
|
|
|
|
begin
|
|
|
|
|
|
sql.Add(' and A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM', now) + '-01') + '''');
|
|
|
|
|
|
sql.Add(' and A.CRTime<''' + Trim(FormatDateTime('yyyy-MM-dd', now + 1)) + '''');
|
|
|
|
|
|
BegDate.Visible := false;
|
|
|
|
|
|
EndDate.Visible := false;
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
sql.Add(' and A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
|
|
|
|
|
|
sql.Add(' and A.CRTime<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.Date + 1)) + '''');
|
|
|
|
|
|
BegDate.Visible := true;
|
|
|
|
|
|
EndDate.Visible := true;
|
|
|
|
|
|
end;
|
|
|
|
|
|
sql.Add(' and isnull(CRType,'''')=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' ');
|
|
|
|
|
|
if canshu1 <> '<27><>Ȩ<EFBFBD><C8A8>' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
sql.add(' and A.filler=''' + trim(DName) + '''');
|
|
|
|
|
|
end;
|
|
|
|
|
|
sql.Add(')AA');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
|
|
|
|
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
2025-08-19 17:40:03 +08:00
|
|
|
|
InitSubGrid();
|
2025-07-05 15:14:36 +08:00
|
|
|
|
finally
|
|
|
|
|
|
ADOQueryMain.EnableControls;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2025-08-19 17:40:03 +08:00
|
|
|
|
procedure TfrmLLCKList.InitGridByCustomer();
|
|
|
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
|
|
|
ADOQuery2.DisableControls;
|
|
|
|
|
|
with ADOQuery2 do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Filtered := False;
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add(' SELECT A.KHName,A.KHCode,A.MYType,SUM(A.PS) as PS,SUM(A.Qty) AS Qty,SUM(A.KgQty) AS KgQty ');
|
|
|
|
|
|
sql.Add(' from CK_MYSC_CR A ');
|
|
|
|
|
|
sql.Add(' where 1=1 ');
|
|
|
|
|
|
if CheckBox1.Checked = False then
|
|
|
|
|
|
begin
|
|
|
|
|
|
sql.Add(' and A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', now)) + '''');
|
|
|
|
|
|
sql.Add(' and A.CRTime<''' + Trim(FormatDateTime('yyyy-MM-dd', now + 1)) + '''');
|
|
|
|
|
|
BegDate.Visible := false;
|
|
|
|
|
|
EndDate.Visible := false;
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
sql.Add(' and A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
|
|
|
|
|
|
sql.Add(' and A.CRTime<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.Date + 1)) + '''');
|
|
|
|
|
|
BegDate.Visible := true;
|
|
|
|
|
|
EndDate.Visible := true;
|
|
|
|
|
|
end;
|
|
|
|
|
|
sql.Add(' and isnull(A.CRType,'''')=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' ');
|
|
|
|
|
|
sql.Add(' GROUP BY A.KHName, A.KHCode, A.MYType ');
|
|
|
|
|
|
sql.Add(' ORDER BY MIN(A.CRTime),A.KHName');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
SCreateCDS20(ADOQuery2, CDS_2);
|
|
|
|
|
|
SInitCDSData20(ADOQuery2, CDS_2);
|
|
|
|
|
|
finally
|
|
|
|
|
|
ADOQuery2.EnableControls;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.InitMXGrid();
|
|
|
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
|
|
|
ADOQuery3.DisableControls;
|
|
|
|
|
|
with ADOQuery3 do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Filtered := False;
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('select AA.* ');
|
|
|
|
|
|
sql.Add(',KHNameHZ=dbo.getpinyin(isnull(AA.KHNameJC,''''))+AA.GYSNo+isnull(AA.KHNameJC,'''')');
|
|
|
|
|
|
sql.Add('from(');
|
|
|
|
|
|
sql.Add(' select A.*,D.KGQTY as JKGQTY ,D.MQTY as JMQTY ,D.MXID,D.CDZSD,D.Fsubid,D.CMXID,D.ZKZT,D.JH,D.KW');
|
|
|
|
|
|
sql.Add(',KHNameJC=(select Top 1 B.KHNameJC from KH_Main B ');
|
|
|
|
|
|
sql.Add(' where isnull(B.KHFlag,'''')=''GYS'' and isnull(B.Valid,'''')=''Y'' and B.KHNO=A.GYSNo)');
|
|
|
|
|
|
sql.Add(',KHNameJCDH=(select Top 1 B.KHNameJC from KH_Main B ');
|
|
|
|
|
|
sql.Add(' where isnull(B.KHFlag,'''')=''GYS'' and isnull(B.Valid,'''')=''Y'' and B.KHNO=A.ToGYSNo)');
|
|
|
|
|
|
sql.Add(',KHNameHZZ=dbo.getpinyin(isnull(KM.KHNameJC,''''))+B.KHNO+isnull(KM.KHNameJC,'''')');
|
|
|
|
|
|
sql.Add(',KHNameJCZ=KM.KHNameJC,B.MLOrderNo,KHNOKH=B.KHNO');
|
|
|
|
|
|
sql.Add(' from CK_MYSC_CR A ');
|
|
|
|
|
|
sql.Add(' left join CK_MYSC_CR_MX D on D.MYID=A.MYID');
|
|
|
|
|
|
sql.Add(' left join ML_OrderMainNew B on A.MainId=B.NewMLID');
|
|
|
|
|
|
sql.Add(' left join KH_Main KM on KM.KHNO=B.KHNO ');
|
|
|
|
|
|
sql.Add(' where 1=1 ');
|
|
|
|
|
|
|
|
|
|
|
|
if CheckBox1.Checked = False then
|
|
|
|
|
|
begin
|
|
|
|
|
|
sql.Add(' and A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', now)) + '''');
|
|
|
|
|
|
sql.Add(' and A.CRTime<''' + Trim(FormatDateTime('yyyy-MM-dd', now + 1)) + '''');
|
|
|
|
|
|
BegDate.Visible := false;
|
|
|
|
|
|
EndDate.Visible := false;
|
|
|
|
|
|
end
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
sql.Add(' and A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.Date)) + '''');
|
|
|
|
|
|
sql.Add(' and A.CRTime<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.Date + 1)) + '''');
|
|
|
|
|
|
BegDate.Visible := true;
|
|
|
|
|
|
EndDate.Visible := true;
|
|
|
|
|
|
end;
|
|
|
|
|
|
sql.Add(' and isnull(CRType,'''')=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' ');
|
|
|
|
|
|
sql.Add(')AA');
|
|
|
|
|
|
sql.Add(' order by AA.CRTime,AA.KHName');
|
|
|
|
|
|
// ShowMessage(SQL.Text);
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
SCreateCDS20(ADOQuery3, CDS_3);
|
|
|
|
|
|
SInitCDSData20(ADOQuery3, CDS_3);
|
|
|
|
|
|
|
|
|
|
|
|
finally
|
|
|
|
|
|
ADOQueryMain.EnableControls;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.InitSubGrid();
|
|
|
|
|
|
var
|
|
|
|
|
|
MYID: string;
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Order_Main.IsEmpty then
|
|
|
|
|
|
exit;
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
ADOQueryTemp.DisableControls;
|
|
|
|
|
|
MYID := Order_Main.FieldByName('MYID').AsString;
|
|
|
|
|
|
|
|
|
|
|
|
with ADOQueryTemp do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Filtered := False;
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('SELECT * FROM CK_MYSC_CR_MX WHERE MYID = ''' + MYID + '''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
SCreateCDS20(ADOQueryTemp, CDS_Sub);
|
|
|
|
|
|
SInitCDSData20(ADOQueryTemp, CDS_Sub);
|
|
|
|
|
|
finally
|
|
|
|
|
|
ADOQueryTemp.EnableControls;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2025-07-05 15:14:36 +08:00
|
|
|
|
procedure TfrmLLCKList.InitForm();
|
|
|
|
|
|
var
|
|
|
|
|
|
fsj: string;
|
|
|
|
|
|
begin
|
|
|
|
|
|
BegDate.Date := StrToDate(formatdatetime('yyyy-MM', SGetServerDate(ADOQueryTemp)) + '-01');
|
|
|
|
|
|
EndDate.Date := SGetServerDate(ADOQueryTemp);
|
2025-08-22 09:38:54 +08:00
|
|
|
|
|
|
|
|
|
|
ReadCxGrid('<27>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', Tv1, 'ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
ReadCxGrid('<27>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӱ<EFBFBD>', TV4, 'ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
ReadCxGrid('<27>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>', TV2, 'ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
ReadCxGrid('<27>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD><CFB8>', TV3, 'ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
2025-08-19 17:40:03 +08:00
|
|
|
|
|
2025-07-05 15:14:36 +08:00
|
|
|
|
InitGrid();
|
2025-08-19 17:40:03 +08:00
|
|
|
|
InitGridByCustomer();
|
|
|
|
|
|
InitMXGrid();
|
2025-07-05 15:14:36 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.TBFindClick(Sender: TObject);
|
|
|
|
|
|
begin
|
2025-08-19 17:40:03 +08:00
|
|
|
|
|
2025-07-05 15:14:36 +08:00
|
|
|
|
if ADOQueryMain.Active = False then
|
2025-08-19 17:40:03 +08:00
|
|
|
|
Exit
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
|
|
|
|
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
|
|
|
|
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2025-08-22 09:38:54 +08:00
|
|
|
|
if ADOQuery2.Active = False then
|
2025-08-19 17:40:03 +08:00
|
|
|
|
Exit
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
SDofilter(ADOQuery2, SGetFilters(Panel1, 1, 2));
|
|
|
|
|
|
SCreateCDS20(ADOQuery2, CDS_2);
|
|
|
|
|
|
SInitCDSData20(ADOQuery2, CDS_2);
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
if ADOQuery3.Active = False then
|
|
|
|
|
|
Exit
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
SDofilter(ADOQuery3, SGetFilters(Panel1, 1, 2));
|
|
|
|
|
|
SCreateCDS20(ADOQuery3, CDS_3);
|
|
|
|
|
|
SInitCDSData20(ADOQuery3, CDS_3);
|
|
|
|
|
|
end;
|
2025-07-05 15:14:36 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function TfrmLLCKList.DelData(): Boolean;
|
|
|
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
|
|
|
Result := false;
|
|
|
|
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|
|
|
|
|
Order_Main.DisableControls;
|
|
|
|
|
|
with Order_Main do
|
|
|
|
|
|
begin
|
|
|
|
|
|
//First;
|
|
|
|
|
|
// while Order_Main.Locate('SSel',True,[]) do
|
|
|
|
|
|
begin
|
|
|
|
|
|
with ADOQueryCmd do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add(' delete YS_Money_CR where YFTypeId=''' + Trim(Order_Main.fieldbyname('MYID').AsString) + '''');
|
|
|
|
|
|
sql.Add(' insert into CK_MYSC_CR_Log ');
|
|
|
|
|
|
sql.Add(' select * from CK_MYSC_CR where MYID=''' + Trim(Order_Main.fieldbyname('MYID').AsString) + '''');
|
|
|
|
|
|
sql.Add(' UPdate CK_MYSC_CR_Log Set DelTime=getdate(),DelerCode=''' + Trim(DCode) + ''',Deler=''' + Trim(DName) + '''');
|
|
|
|
|
|
sql.Add(' where MYID=''' + Trim(Order_Main.fieldbyname('MYID').AsString) + '''');
|
|
|
|
|
|
sql.Add(' Delete CK_MYSC_CR where MYId=''' + Trim(Order_Main.fieldbyname('MYId').AsString) + '''');
|
|
|
|
|
|
sql.Add(' delete from TP_File where WBID=''' + trim(Order_Main.fieldbyname('MYId').AsString) + ''' ');
|
|
|
|
|
|
sql.Add(' and TFType=''<27>ӹ<EFBFBD><D3B9>뵥''');
|
|
|
|
|
|
ExecSQL;
|
|
|
|
|
|
end;
|
|
|
|
|
|
Order_Main.Delete;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
Order_Main.EnableControls;
|
|
|
|
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|
|
|
|
|
Result := True;
|
|
|
|
|
|
except
|
|
|
|
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|
|
|
|
|
Result := False;
|
|
|
|
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>쳣<EFBFBD><ECB3A3>', '<27><>ʾ', 0);
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.TBExportClick(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
if ADOQueryMain.IsEmpty then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
TcxGridToExcel(Self.Caption, cxGrid1);
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.TBRafreshClick(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
InitGrid();
|
2025-08-19 17:40:03 +08:00
|
|
|
|
InitGridByCustomer();
|
|
|
|
|
|
InitMXGrid();
|
2025-07-05 15:14:36 +08:00
|
|
|
|
TBFind.Click;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.TBAddClick(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
|
|
|
frmLLCKInPut := TfrmLLCKInPut.Create(Application);
|
|
|
|
|
|
with frmLLCKInPut do
|
|
|
|
|
|
begin
|
|
|
|
|
|
PState := 0;
|
|
|
|
|
|
FMainId := '';
|
|
|
|
|
|
if ShowModal = 1 then
|
|
|
|
|
|
begin
|
2025-08-19 17:40:03 +08:00
|
|
|
|
TBRafresh.Click
|
2025-07-05 15:14:36 +08:00
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
finally
|
|
|
|
|
|
frmLLCKInPut.Free;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.FormShow(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
InitForm();
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.CheckBox1Click(Sender: TObject);
|
|
|
|
|
|
begin
|
2025-08-19 17:40:03 +08:00
|
|
|
|
TBRafresh.Click
|
2025-07-05 15:14:36 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.CheckBox2Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
TBRafresh.Click;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.ToolButton1Click(Sender: TObject);
|
|
|
|
|
|
var
|
|
|
|
|
|
FFMYType: string;
|
|
|
|
|
|
begin
|
|
|
|
|
|
{FFMYType:=Trim(Order_Main.fieldbyname('MYType').AsString);
|
|
|
|
|
|
try
|
|
|
|
|
|
frmLLRKInPutMH_RCCG:=TfrmLLRKInPutMH_RCCG.Create(Application);
|
|
|
|
|
|
with frmLLRKInPutMH_RCCG do
|
|
|
|
|
|
begin
|
|
|
|
|
|
PState:=1;
|
|
|
|
|
|
FMainId:=Trim(Self.Order_Main.fieldbyname('MYId').AsString);
|
|
|
|
|
|
FMYType:=Trim(Self.Order_Main.fieldbyname('MYType').AsString);
|
|
|
|
|
|
FMYTypeFlag:=Trim(Self.Order_Main.fieldbyname('MYTypeFlag').AsString);
|
|
|
|
|
|
labMYType.Caption:=Trim(Self.Order_Main.fieldbyname('MYTypeFlag').AsString);
|
|
|
|
|
|
if ShowModal=1 then
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
finally
|
|
|
|
|
|
frmLLRKInPutMH_RCCG.Free;
|
|
|
|
|
|
end; }
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.CustomerNoNameChange(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
if ADOQueryMain.Active = False then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
|
|
|
|
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
|
|
|
|
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
2025-08-19 17:40:03 +08:00
|
|
|
|
|
|
|
|
|
|
if ADOQueryMain.Active = False then
|
|
|
|
|
|
Exit
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
|
|
|
|
|
SCreateCDS20(ADOQueryMain, Order_Main);
|
|
|
|
|
|
SInitCDSData20(ADOQueryMain, Order_Main);
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
if ADOQuery2.Active = False then
|
|
|
|
|
|
Exit
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
2025-08-22 09:38:54 +08:00
|
|
|
|
SDofilter(ADOQuery2, SGetFilters(Panel1, 1, 2));
|
2025-08-19 17:40:03 +08:00
|
|
|
|
SCreateCDS20(ADOQuery2, CDS_2);
|
|
|
|
|
|
SInitCDSData20(ADOQuery2, CDS_2);
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
if ADOQuery3.Active = False then
|
|
|
|
|
|
Exit
|
|
|
|
|
|
else
|
|
|
|
|
|
begin
|
|
|
|
|
|
SDofilter(ADOQuery3, SGetFilters(Panel1, 1, 2));
|
|
|
|
|
|
SCreateCDS20(ADOQuery3, CDS_3);
|
|
|
|
|
|
SInitCDSData20(ADOQuery3, CDS_3);
|
|
|
|
|
|
end;
|
2025-07-05 15:14:36 +08:00
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.N2Click(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Order_Main.IsEmpty then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
if Trim(canshu1) <> '<27><>Ȩ<EFBFBD><C8A8>' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Order_Main.FieldByName('filltime').AsDateTime + 1 < Now then
|
|
|
|
|
|
begin
|
|
|
|
|
|
application.MessageBox('<27><><EFBFBD><EFBFBD>һ<EFBFBD>첻<EFBFBD><ECB2BB>ɾ<EFBFBD><C9BE>', '<27><>ʾ');
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryTemp do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('select * from YS_Money_CR where YFTypeId=''' + Trim(Self.Order_Main.fieldbyname('MYId').AsString) + '''');
|
|
|
|
|
|
sql.Add(' and ChkStatusP=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if ADOQueryTemp.IsEmpty = false then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Application.MessageBox('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><CBB2>ܲ<EFBFBD><DCB2><EFBFBD>', '<27><>ʾ');
|
|
|
|
|
|
exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryTemp do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('select * from YS_Money_CR where YFTypeId=''' + trim(Order_Main.fieldbyname('MYID').AsString) + '''');
|
|
|
|
|
|
sql.Add(' and (isnull(ChkerP,'''')<>'''' ');
|
|
|
|
|
|
sql.Add(' or isnull(ChkerQ,'''')<>'''') ');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if ADOQueryTemp.IsEmpty = false then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Application.MessageBox('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>', '<27><>ʾ');
|
|
|
|
|
|
exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
if DelData() then
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.N1Click(Sender: TObject);
|
|
|
|
|
|
var
|
|
|
|
|
|
FFMYType: string;
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Order_Main.IsEmpty then
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
if Trim(canshu1) <> '<27><>Ȩ<EFBFBD><C8A8>' then
|
|
|
|
|
|
begin
|
|
|
|
|
|
if Order_Main.FieldByName('filltime').AsDateTime + 1 < Now then
|
|
|
|
|
|
begin
|
|
|
|
|
|
application.MessageBox('<27><><EFBFBD><EFBFBD>һ<EFBFBD>첻<EFBFBD><ECB2BB><EFBFBD><EFBFBD>', '<27><>ʾ');
|
|
|
|
|
|
Exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
with ADOQueryTemp do
|
|
|
|
|
|
begin
|
|
|
|
|
|
Close;
|
|
|
|
|
|
sql.Clear;
|
|
|
|
|
|
sql.Add('select * from YS_Money_CR where YFTypeId=''' + Trim(Self.Order_Main.fieldbyname('MYId').AsString) + '''');
|
|
|
|
|
|
sql.Add(' and ChkStatusP=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
|
|
|
|
|
|
Open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
if ADOQueryTemp.IsEmpty = false then
|
|
|
|
|
|
begin
|
|
|
|
|
|
Application.MessageBox('Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><CBB2>ܲ<EFBFBD><DCB2><EFBFBD>', '<27><>ʾ');
|
|
|
|
|
|
exit;
|
|
|
|
|
|
end;
|
|
|
|
|
|
{ FFMYType:=Trim(Order_Main.fieldbyname('MYType').AsString); //<2F><><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>ChkerP=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''
|
|
|
|
|
|
try
|
|
|
|
|
|
frmLLRKInPutMH_RCCG:=TfrmLLRKInPutMH_RCCG.Create(Application);
|
|
|
|
|
|
with frmLLRKInPutMH_RCCG do
|
|
|
|
|
|
begin
|
|
|
|
|
|
PState:=1;
|
|
|
|
|
|
FMainId:=Trim(Self.Order_Main.fieldbyname('MYId').AsString);
|
|
|
|
|
|
FMYType:=Trim(Self.Order_Main.fieldbyname('MYType').AsString);
|
|
|
|
|
|
FMYTypeFlag:=Trim(Self.Order_Main.fieldbyname('MYTypeFlag').AsString);
|
|
|
|
|
|
labMYType.Caption:=Trim(Self.Order_Main.fieldbyname('MYTypeFlag').AsString)+'<27>ӹ<EFBFBD><D3B9>뵥';
|
|
|
|
|
|
if ShowModal=1 then
|
|
|
|
|
|
begin
|
|
|
|
|
|
InitGrid();
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
finally
|
|
|
|
|
|
frmLLRKInPutMH_RCCG.Free;
|
|
|
|
|
|
end; }
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.ZJStatusChange(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
TBFind.Click;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.Tv1DblClick(Sender: TObject);
|
|
|
|
|
|
begin
|
|
|
|
|
|
ToolButton1.Click;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.v1Column1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
|
|
|
|
|
var
|
|
|
|
|
|
Id, Id10: Integer;
|
|
|
|
|
|
begin
|
|
|
|
|
|
Id := TV1.GetColumnByFieldName('PS').Index;
|
|
|
|
|
|
Id10 := TV1.GetColumnByFieldName('MXHZPS').Index;
|
|
|
|
|
|
if (AViewInfo.GridRecord.Values[Id]) <> (AViewInfo.GridRecord.Values[Id10]) then
|
|
|
|
|
|
begin
|
|
|
|
|
|
ACanvas.Brush.Color := clRed;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.v1Column17CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
|
|
|
|
|
var
|
|
|
|
|
|
Id, Id10: Integer;
|
|
|
|
|
|
begin
|
|
|
|
|
|
Id := TV1.GetColumnByFieldName('KgQty').Index;
|
|
|
|
|
|
Id10 := TV1.GetColumnByFieldName('MXHZKgQty').Index;
|
|
|
|
|
|
if (AViewInfo.GridRecord.Values[Id]) <> (AViewInfo.GridRecord.Values[Id10]) then
|
|
|
|
|
|
begin
|
|
|
|
|
|
ACanvas.Brush.Color := clRed;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TfrmLLCKList.v1Column3CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
|
|
|
|
|
var
|
|
|
|
|
|
Id, Id10: Integer;
|
|
|
|
|
|
begin
|
|
|
|
|
|
Id := TV1.GetColumnByFieldName('Qty').Index;
|
|
|
|
|
|
Id10 := TV1.GetColumnByFieldName('MXHZQty').Index;
|
|
|
|
|
|
if (AViewInfo.GridRecord.Values[Id]) <> (AViewInfo.GridRecord.Values[Id10]) then
|
|
|
|
|
|
begin
|
|
|
|
|
|
ACanvas.Brush.Color := clRed;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2025-08-19 17:40:03 +08:00
|
|
|
|
procedure TfrmLLCKList.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
|
|
|
|
|
begin
|
|
|
|
|
|
InitSubGrid();
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
2025-07-05 15:14:36 +08:00
|
|
|
|
end.
|
|
|
|
|
|
|