1463 lines
42 KiB
ObjectPascal
1463 lines
42 KiB
ObjectPascal
unit U_MCGRKList;
|
||
|
||
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, cxContainer, cxGroupBox, IdBaseComponent,
|
||
IdComponent, IdTCPConnection, IdTCPClient, IdFTP, ShellAPI, ImgList, StrUtils,
|
||
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
|
||
TfrmMCGRKList = 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;
|
||
DataSource1: TDataSource;
|
||
TBExport: TToolButton;
|
||
Order_Main: TClientDataSet;
|
||
ToolButton1: TToolButton;
|
||
Panel1: TPanel;
|
||
v1Column1: TcxGridDBColumn;
|
||
Label34: TLabel;
|
||
v1Column7: TcxGridDBColumn;
|
||
v1Column9: TcxGridDBColumn;
|
||
BegDate: TDateTimePicker;
|
||
EndDate: TDateTimePicker;
|
||
ToolButton4: TToolButton;
|
||
RM1: TRMGridReport;
|
||
RMDBMain: TRMDBDataSet;
|
||
RMXLSExport2: TRMXLSExport;
|
||
CDS_PRT: TClientDataSet;
|
||
v1Column17: TcxGridDBColumn;
|
||
v1Column3: TcxGridDBColumn;
|
||
labMYType: TLabel;
|
||
v1MYType: TcxGridDBColumn;
|
||
PopupMenu1: TPopupMenu;
|
||
N1: TMenuItem;
|
||
N2: TMenuItem;
|
||
CheckBox1: TCheckBox;
|
||
Button2: TButton;
|
||
v1MYMDMoney: TcxGridDBColumn;
|
||
v1JCDanWeiJC: TcxGridDBColumn;
|
||
Label3: TLabel;
|
||
Button1: TButton;
|
||
Label4: TLabel;
|
||
filler: TEdit;
|
||
v1filler: TcxGridDBColumn;
|
||
cxGroupBox2: TcxGroupBox;
|
||
ListView1: TListView;
|
||
Panel12: TPanel;
|
||
Label8: TLabel;
|
||
Button4: TButton;
|
||
Panel13: TPanel;
|
||
Image1: TImage;
|
||
WJName: TEdit;
|
||
Button7: TButton;
|
||
WJPach: TEdit;
|
||
Button8: TButton;
|
||
Panel3: TPanel;
|
||
v1IFFZ: TcxGridDBColumn;
|
||
ODPat: TOpenDialog;
|
||
IdFTP1: TIdFTP;
|
||
PopupMenu2: TPopupMenu;
|
||
MenuItem1: TMenuItem;
|
||
N3: TMenuItem;
|
||
MenuItem2: TMenuItem;
|
||
N4: TMenuItem;
|
||
Label2: TLabel;
|
||
Label1: TLabel;
|
||
MYName: TEdit;
|
||
Note: TEdit;
|
||
Button3: TButton;
|
||
ImageList1: TImageList;
|
||
v1RKNo: TcxGridDBColumn;
|
||
Image3: TImage;
|
||
v1editer: TcxGridDBColumn;
|
||
KHNo: TEdit;
|
||
JCKHNo: TEdit;
|
||
v1GFOrderNo: TcxGridDBColumn;
|
||
v1Column2: TcxGridDBColumn;
|
||
Label5: TLabel;
|
||
CGName: TEdit;
|
||
ToolButton2: TToolButton;
|
||
v1MYName: TcxGridDBColumn;
|
||
v1MYMF: TcxGridDBColumn;
|
||
v1MYKZ: TcxGridDBColumn;
|
||
N5: TMenuItem;
|
||
N6: TMenuItem;
|
||
Label6: TLabel;
|
||
Label7: TLabel;
|
||
v1MYMDPrice: TcxGridDBColumn;
|
||
Tv1Column1: TcxGridDBColumn;
|
||
Label9: TLabel;
|
||
PMHH: TEdit;
|
||
KHNameJC: TComboBox;
|
||
JCDanWeiJC: TComboBox;
|
||
MYMF: TComboBox;
|
||
MYKZ: TComboBox;
|
||
ToolButton3: TToolButton;
|
||
Tv1Column2: TcxGridDBColumn;
|
||
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 cxTabControl1Change(Sender: TObject);
|
||
procedure ZJStatusChange(Sender: TObject);
|
||
procedure ToolButton4Click(Sender: TObject);
|
||
procedure Tv1DblClick(Sender: TObject);
|
||
procedure SpeedButton2Click(Sender: TObject);
|
||
procedure SpeedButton4Click(Sender: TObject);
|
||
procedure SpeedButton5Click(Sender: TObject);
|
||
procedure SpeedButton3Click(Sender: TObject);
|
||
procedure SpeedButton6Click(Sender: TObject);
|
||
procedure Button2Click(Sender: TObject);
|
||
procedure Button1Click(Sender: TObject);
|
||
procedure Button3Click(Sender: TObject);
|
||
procedure Button4Click(Sender: TObject);
|
||
procedure Button8Click(Sender: TObject);
|
||
procedure Button7Click(Sender: TObject);
|
||
procedure Image1Click(Sender: TObject);
|
||
procedure MenuItem1Click(Sender: TObject);
|
||
procedure N3Click(Sender: TObject);
|
||
procedure Image3Click(Sender: TObject);
|
||
procedure ListView1DblClick(Sender: TObject);
|
||
procedure N4Click(Sender: TObject);
|
||
procedure MenuItem2Click(Sender: TObject);
|
||
procedure ToolButton2Click(Sender: TObject);
|
||
procedure N5Click(Sender: TObject);
|
||
procedure N6Click(Sender: TObject);
|
||
procedure ToolButton3Click(Sender: TObject);
|
||
private
|
||
canshu1: string;
|
||
DQdate: TDateTime;
|
||
procedure InitGrid();
|
||
procedure InitForm();
|
||
function DelData(): Boolean;
|
||
procedure Initimage();
|
||
{ Private declarations }
|
||
public
|
||
FFInt, FCloth: Integer;
|
||
|
||
{ Public declarations }
|
||
end;
|
||
|
||
//var
|
||
// frmMCGRKList: TfrmMCGRKList;
|
||
|
||
implementation
|
||
|
||
uses
|
||
U_DataLink, U_RTFun, U_QCRKInPut, U_ZDYHelp, U_LLRKInPut, U_GYSList,
|
||
U_LLRKInPutMH_MCG, U_LLRKInPutMH, U_LLRKInPutX, U_LLRKInPut_CG,
|
||
U_LLRKInPutMH_CG, U_BPZdy_LRM, U_LLRKInPutMH_MTHCK, U_LLRKInPutMH_MPD;
|
||
|
||
{$R *.dfm}
|
||
|
||
procedure TfrmMCGRKList.FormDestroy(Sender: TObject);
|
||
begin
|
||
// frmMCGRKList:=nil;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||
begin
|
||
Action := caFree;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.FormCreate(Sender: TObject);
|
||
begin
|
||
cxgrid1.Align := alClient;
|
||
canshu1 := Trim(DParameters1);
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.TBCloseClick(Sender: TObject);
|
||
begin
|
||
WriteCxGrid('<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD>2', Tv1, 'ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
Close;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.InitGrid();
|
||
begin
|
||
try
|
||
ADOQueryMain.DisableControls;
|
||
with ADOQueryMain do
|
||
begin
|
||
Filtered := False;
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select A.*');
|
||
sql.add(',IFFZ=(select Count(B.WBID) from TP_File B where B.WBID=A.RKNo and B.TFType=''<27>ɹ<EFBFBD><C9B9><EFBFBD>'')');
|
||
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.KHName=A.KHName)');
|
||
sql.Add(',JCDanWeiJC=(select Top 1 B.KHNameJC from KH_Main B ');
|
||
sql.Add(' where isnull(B.KHFlag,'''')=''GS'' and isnull(B.Valid,'''')=''Y'' and B.KHName=A.JCDanWei)');
|
||
sql.Add(',KHNo=(select Top 1 B.KHNo from KH_Main B ');
|
||
sql.Add(' where isnull(B.KHFlag,'''')=''GYS'' and isnull(B.Valid,'''')=''Y'' and B.KHName=A.KHName)');
|
||
sql.Add(',JCKHNo=(select Top 1 B.KHNo from KH_Main B ');
|
||
sql.Add(' where isnull(B.KHFlag,'''')=''GYS'' and isnull(B.Valid,'''')=''Y'' and B.KHName=A.JCDanWei)');
|
||
sql.Add(' from CK_MYSC_CR A ');
|
||
sql.Add(' where 1=1 ');
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
sql.Add(' and isnull(SJLX,''<27><>'') =''<27><>'' ');
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
sql.Add(' and isnull(SJLX,''<27><>'') =''<27><>'' ');
|
||
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><C9B9><EFBFBD><EFBFBD><EFBFBD>'' and isnull(MYType,'''')=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
// ShowMessage(sql.text);
|
||
Open;
|
||
end;
|
||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||
finally
|
||
ADOQueryMain.EnableControls;
|
||
end;
|
||
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select distinct(B.KHNameJC) AS name from CK_MYSC_CR A ');
|
||
sql.Add('inner join KH_Main B on A.KHName=B.KHName and isnull(B.KHFlag,'''')=''GYS'' and isnull(B.Valid,'''')=''Y'' ');
|
||
sql.Add(' where 1=1 ');
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
sql.Add(' and isnull(SJLX,''<27><>'') =''<27><>'' ');
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
sql.Add(' and isnull(SJLX,''<27><>'') =''<27><>'' ');
|
||
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><C9B9><EFBFBD><EFBFBD><EFBFBD>'' and isnull(MYType,'''')=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
Open;
|
||
end;
|
||
KHNameJC.Items.Clear; //<2F><><EFBFBD><EFBFBD>
|
||
KHNameJC.Items.Add(Trim(''));
|
||
while not ADOQueryCmd.eof do
|
||
begin
|
||
KHNameJC.Items.Add(ADOQueryCmd.fieldbyname('name').AsString);
|
||
ADOQueryCmd.next;
|
||
end;
|
||
|
||
///////////////////////////////////////////////////
|
||
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select distinct(B.KHNameJC) AS name from CK_MYSC_CR A ');
|
||
sql.Add('inner join KH_Main B on A.JCDanWei=B.KHName and isnull(B.KHFlag,'''')=''GS'' and isnull(B.Valid,'''')=''Y'' ');
|
||
sql.Add(' where 1=1 ');
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
sql.Add(' and isnull(SJLX,''<27><>'') =''<27><>'' ');
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
sql.Add(' and isnull(SJLX,''<27><>'') =''<27><>'' ');
|
||
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><C9B9><EFBFBD><EFBFBD><EFBFBD>'' and isnull(MYType,'''')=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
Open;
|
||
end;
|
||
JCDanWeiJC.Items.Clear; //<2F><><EFBFBD><EFBFBD>
|
||
JCDanWeiJC.Items.Add(Trim(''));
|
||
while not ADOQueryCmd.eof do
|
||
begin
|
||
JCDanWeiJC.Items.Add(ADOQueryCmd.fieldbyname('name').AsString);
|
||
ADOQueryCmd.next;
|
||
end;
|
||
|
||
///////////////////////////////////////////////////
|
||
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select distinct(A.MYMF) AS name from CK_MYSC_CR A ');
|
||
sql.Add('inner join KH_Main B on A.JCDanWei=B.KHName and isnull(B.KHFlag,'''')=''GS'' and isnull(B.Valid,'''')=''Y'' ');
|
||
sql.Add(' where 1=1 ');
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
sql.Add(' and isnull(SJLX,''<27><>'') =''<27><>'' ');
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
sql.Add(' and isnull(SJLX,''<27><>'') =''<27><>'' ');
|
||
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><C9B9><EFBFBD><EFBFBD><EFBFBD>'' and isnull(MYType,'''')=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
Open;
|
||
end;
|
||
MYMF.Items.Clear; //<2F><><EFBFBD><EFBFBD>
|
||
MYMF.Items.Add(Trim(''));
|
||
while not ADOQueryCmd.eof do
|
||
begin
|
||
MYMF.Items.Add(ADOQueryCmd.fieldbyname('name').AsString);
|
||
ADOQueryCmd.next;
|
||
end;
|
||
////////////////////////////////////
|
||
|
||
with ADOQueryCmd do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select distinct(A.MYKZ) AS name from CK_MYSC_CR A ');
|
||
sql.Add('inner join KH_Main B on A.JCDanWei=B.KHName and isnull(B.KHFlag,'''')=''GS'' and isnull(B.Valid,'''')=''Y'' ');
|
||
sql.Add(' where 1=1 ');
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
sql.Add(' and isnull(SJLX,''<27><>'') =''<27><>'' ');
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
sql.Add(' and isnull(SJLX,''<27><>'') =''<27><>'' ');
|
||
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><C9B9><EFBFBD><EFBFBD><EFBFBD>'' and isnull(MYType,'''')=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
Open;
|
||
end;
|
||
MYKZ.Items.Clear; //<2F><><EFBFBD><EFBFBD>
|
||
MYKZ.Items.Add(Trim(''));
|
||
while not ADOQueryCmd.eof do
|
||
begin
|
||
MYKZ.Items.Add(ADOQueryCmd.fieldbyname('name').AsString);
|
||
ADOQueryCmd.next;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.InitForm();
|
||
begin
|
||
BegDate.Date := SGetServerDateMBeg(ADOQueryTemp);
|
||
EndDate.Date := SGetServerDate(ADOQueryTemp);
|
||
ReadCxGrid('<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD>2', Tv1, 'ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||
v1MYMDPrice.Visible := false;
|
||
if canshu1 = '<27><>Ȩ<EFBFBD><C8A8>' then
|
||
begin
|
||
v1MYMDPrice.Visible := true;
|
||
end;
|
||
InitGrid();
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.TBFindClick(Sender: TObject);
|
||
begin
|
||
if ADOQueryMain.Active = False then
|
||
Exit;
|
||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||
end;
|
||
|
||
function TfrmMCGRKList.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 from 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 from CK_MYSC_CR where MYID=''' + Trim(Order_Main.fieldbyname('MYID').AsString) + '''');
|
||
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 TfrmMCGRKList.TBExportClick(Sender: TObject);
|
||
begin
|
||
if ADOQueryMain.IsEmpty then
|
||
Exit;
|
||
TcxGridToExcel(Self.Caption, cxGrid1);
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.TBRafreshClick(Sender: TObject);
|
||
begin
|
||
InitGrid();
|
||
TBFind.Click;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.TBAddClick(Sender: TObject);
|
||
begin
|
||
try
|
||
frmLLRKInPutMH_MCG := TfrmLLRKInPutMH_MCG.Create(Application);
|
||
with frmLLRKInPutMH_MCG do
|
||
begin
|
||
PState := 0;
|
||
FMainId := '';
|
||
FSubid := '';
|
||
FMYType := '<27>ɹ<EFBFBD><C9B9><EFBFBD>';
|
||
FMYTypeFlag := 'CGH';
|
||
labMYType.Caption := '(<28><>)<29>ɹ<EFBFBD>';
|
||
FML := '<27><>';
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
SJLX := '<27><>';
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
SJLX := '<27><>';
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPutMH_MCG.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.FormShow(Sender: TObject);
|
||
begin
|
||
InitForm();
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.CheckBox1Click(Sender: TObject);
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.CheckBox2Click(Sender: TObject);
|
||
begin
|
||
TBRafresh.Click;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.ToolButton1Click(Sender: TObject);
|
||
begin
|
||
try
|
||
frmLLRKInPutMH_MCG := TfrmLLRKInPutMH_MCG.Create(Application);
|
||
with frmLLRKInPutMH_MCG do
|
||
begin
|
||
PState := 1;
|
||
FMainId := Trim(Self.Order_Main.fieldbyname('RKNo').AsString);
|
||
FSubid := Trim(Self.Order_Main.fieldbyname('MYID').AsString);
|
||
FMYType := Trim(Self.Order_Main.fieldbyname('MYType').AsString);
|
||
FMYTypeFlag := Trim(Self.Order_Main.fieldbyname('MYTypeFlag').AsString);
|
||
TBSave.Visible := False;
|
||
labMYType.Caption := '(<28><>)<29>ɹ<EFBFBD>';
|
||
PopupMenu1.Items.Clear;
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPutMH_MCG.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.CustomerNoNameChange(Sender: TObject);
|
||
begin
|
||
if ADOQueryMain.Active = False then
|
||
Exit;
|
||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.N2Click(Sender: TObject);
|
||
begin
|
||
if Order_Main.IsEmpty then
|
||
Exit;
|
||
if Trim(DParameters1) <> '<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;
|
||
if Application.MessageBox('ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
||
Exit;
|
||
if DelData() then
|
||
begin
|
||
//Order_Main.Delete;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.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;
|
||
if Trim(Order_Main.fieldbyname('CRType').AsString) = '<27>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>' then
|
||
begin
|
||
try
|
||
frmLLRKInPutMH_MCG := TfrmLLRKInPutMH_MCG.Create(Application);
|
||
with frmLLRKInPutMH_MCG do
|
||
begin
|
||
PState := 1;
|
||
FMainId := Trim(Self.Order_Main.fieldbyname('RKNo').AsString);
|
||
FSubid := 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 := '(<28><>)<29>ɹ<EFBFBD>';
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
SJLX := '<27><>';
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
SJLX := '<27><>';
|
||
//Panel5.Visible:=false;
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPutMH_MCG.Free;
|
||
end;
|
||
end
|
||
else if Trim(Order_Main.fieldbyname('CRType').AsString) = '<27>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD>' then
|
||
begin
|
||
try
|
||
frmLLRKInPutMH_MPD := TfrmLLRKInPutMH_MPD.Create(Application);
|
||
with frmLLRKInPutMH_MPD do
|
||
begin
|
||
PState := 1;
|
||
FMainId := Trim(Self.Order_Main.fieldbyname('RKNo').AsString);
|
||
FSubid := 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 := '(<28><>)<29>̵<EFBFBD>';
|
||
//Panel5.Visible:=false;
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPutMH_MPD.Free;
|
||
end;
|
||
end;
|
||
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.cxTabControl1Change(Sender: TObject);
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.ZJStatusChange(Sender: TObject);
|
||
begin
|
||
TBFind.Click;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.ToolButton4Click(Sender: TObject);
|
||
var
|
||
fPrintFile: string;
|
||
begin
|
||
if Order_Main.IsEmpty then
|
||
Exit;
|
||
if Trim(Order_Main.fieldbyname('Chker').AsString) = '' then
|
||
exit;
|
||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\<5C><><EFBFBD>ⱨ<EFBFBD><E2B1A8>.rmf';
|
||
RMXLSExport2 := TRMXLSExport.Create(RMXLSExport2);
|
||
with ADOQueryTemp do
|
||
begin
|
||
Close;
|
||
sql.Clear;
|
||
sql.Add('select * from Test_Report where TRId=''' + Trim(Order_Main.fieldbyname('TRId').AsString) + '''');
|
||
Open;
|
||
end;
|
||
SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||
SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||
if FileExists(fPrintFile) then
|
||
begin
|
||
//RMVariables['OrderUnit']:=Order_Main.fieldbyname('OrderUnit').Value;
|
||
RM1.LoadFromFile(fPrintFile);
|
||
RM1.ShowReport;
|
||
end
|
||
else
|
||
begin
|
||
Application.MessageBox(PChar('û<><C3BB><EFBFBD><EFBFBD>' + ExtractFilePath(Application.ExeName) + 'Report\<5C><><EFBFBD>ⱨ<EFBFBD><E2B1A8>.rmf'), '<27><>ʾ', 0);
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.Tv1DblClick(Sender: TObject);
|
||
begin
|
||
if Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName = 'IFFZ' then
|
||
begin
|
||
cxGroupBox2.Visible := true;
|
||
Initimage();
|
||
end
|
||
else
|
||
ToolButton1.Click;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.SpeedButton2Click(Sender: TObject);
|
||
begin
|
||
try
|
||
frmLLRKInPut_CG := TfrmLLRKInPut_CG.Create(Application);
|
||
with frmLLRKInPut_CG do
|
||
begin
|
||
PState := 0;
|
||
FMainId := '';
|
||
FMYType := '<27>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>';
|
||
FMYTypeFlag := 'CGM';
|
||
labMYType.Caption := '(<28><><EFBFBD><EFBFBD>)<29>ɹ<EFBFBD>';
|
||
FML := '<27><><EFBFBD><EFBFBD>';
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPut_CG.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.SpeedButton4Click(Sender: TObject);
|
||
begin
|
||
|
||
try
|
||
frmLLRKInPutMH_CG := TfrmLLRKInPutMH_CG.Create(Application);
|
||
with frmLLRKInPutMH_CG do
|
||
begin
|
||
PState := 0;
|
||
FMainId := '';
|
||
FMYType := '<27>ɹ<EFBFBD><C9B9><EFBFBD>';
|
||
FMYTypeFlag := 'CGH';
|
||
labMYType.Caption := '(<28><>)<29>ɹ<EFBFBD>';
|
||
FML := '<27><>';
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPutMH_CG.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.SpeedButton5Click(Sender: TObject);
|
||
begin
|
||
|
||
try
|
||
frmLLRKInPutMH_CG := TfrmLLRKInPutMH_CG.Create(Application);
|
||
with frmLLRKInPutMH_CG do
|
||
begin
|
||
PState := 0;
|
||
FMainId := '';
|
||
FMYType := '<27>ɹ<EFBFBD><C9B9>IJ<DEB7>';
|
||
FMYTypeFlag := 'CGW';
|
||
labMYType.Caption := '(<28>IJ<DEB7>)<29>ɹ<EFBFBD>';
|
||
FML := '<27>IJ<DEB7>';
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPutMH_CG.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.SpeedButton3Click(Sender: TObject);
|
||
begin
|
||
|
||
try
|
||
frmLLRKInPut_CG := TfrmLLRKInPut_CG.Create(Application);
|
||
with frmLLRKInPut_CG do
|
||
begin
|
||
PState := 0;
|
||
FMainId := '';
|
||
FMYType := '<27>ɹ<EFBFBD><C9B9><EFBFBD>';
|
||
FMYTypeFlag := 'CGX';
|
||
labMYType.Caption := '(<28><>)<29>ɹ<EFBFBD>';
|
||
FML := '<27><>';
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPut_CG.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.SpeedButton6Click(Sender: TObject);
|
||
begin
|
||
|
||
try
|
||
frmLLRKInPut_CG := TfrmLLRKInPut_CG.Create(Application);
|
||
with frmLLRKInPut_CG do
|
||
begin
|
||
PState := 0;
|
||
FMainId := '';
|
||
FMYType := '<27>ɹ<EFBFBD><C9B9><EFBFBD>Ʒ';
|
||
FMYTypeFlag := 'CGC';
|
||
labMYType.Caption := '<27>ɹ<EFBFBD>(<28><>Ʒ)';
|
||
FML := '<27><>Ʒ';
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPut_CG.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.Button2Click(Sender: TObject);
|
||
begin
|
||
try
|
||
frmGYSList := TfrmGYSList.Create(Application);
|
||
with frmGYSList do
|
||
begin
|
||
KHType.Text := '<27><EFBFBD>';
|
||
KHType.TxtCode := '<27><EFBFBD>';
|
||
if ShowModal = 1 then
|
||
begin
|
||
Self.KHNameJC.Text := Trim(frmGYSList.Order_Main.fieldbyname('KHNameJC').AsString);
|
||
TBFind.Click;
|
||
end;
|
||
end;
|
||
finally
|
||
frmGYSList.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.Button1Click(Sender: TObject);
|
||
begin
|
||
try
|
||
frmGYSList := TfrmGYSList.Create(Application);
|
||
with frmGYSList do
|
||
begin
|
||
KHType.Text := '<27>廨<EFBFBD><E5BBA8>';
|
||
KHType.TxtCode := '<27>廨<EFBFBD><E5BBA8>';
|
||
if ShowModal = 1 then
|
||
begin
|
||
Self.JCDanWeiJC.Text := Trim(frmGYSList.Order_Main.fieldbyname('KHNameJC').AsString);
|
||
TBFind.Click;
|
||
end;
|
||
end;
|
||
finally
|
||
frmGYSList.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.Button3Click(Sender: TObject);
|
||
begin
|
||
frmBPZDY_LRM := TfrmBPZDY_LRM.create(self);
|
||
with frmBPZDY_LRM do
|
||
begin
|
||
flag := 'MName';
|
||
flagName := '<27><>';
|
||
ViewFlag := true;
|
||
Panel4.Align := alClient;
|
||
ToolBar3.Visible := false;
|
||
Button1.Visible := False;
|
||
if ShowModal = 1 then
|
||
begin
|
||
MYName.text := Trim(ClientDataSet1.fieldbyname('BPName').AsString);
|
||
end;
|
||
free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.Initimage();
|
||
var
|
||
ListItem: TListItem;
|
||
Flag: Cardinal;
|
||
info: SHFILEINFOA;
|
||
Icon: TIcon;
|
||
begin
|
||
ListView1.Items.Clear;
|
||
with adoqueryTemp do
|
||
begin
|
||
close;
|
||
sql.Clear;
|
||
sql.Add('select fileName from TP_File ');
|
||
sql.Add('where WBID=''' + trim(Order_Main.fieldbyname('RKNo').AsString) + ''' ');
|
||
sql.Add('and TFType=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
open;
|
||
if not IsEmpty then
|
||
begin
|
||
while not eof do
|
||
begin
|
||
with ListView1 do
|
||
begin
|
||
LargeImages := ImageList1;
|
||
Icon := TIcon.Create;
|
||
ListItem := Items.Add;
|
||
ListItem.Caption := trim(fieldbyname('fileName').AsString);
|
||
Flag := (SHGFI_LARGEICON or SHGFI_ICON or SHGFI_USEFILEATTRIBUTES);
|
||
SHGetFileInfo(Pchar(trim(fieldbyname('fileName').AsString)), 0, info, Sizeof(info), Flag);
|
||
Icon.Handle := info.hIcon;
|
||
ImageList1.AddIcon(Icon);
|
||
ListItem.ImageIndex := ImageList1.Count - 1;
|
||
end;
|
||
next;
|
||
end;
|
||
end;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.Button4Click(Sender: TObject);
|
||
var
|
||
fFileName: string;
|
||
fFilePath: string;
|
||
maxNo: string;
|
||
begin
|
||
try
|
||
adoqueryCmd.Connection.BeginTrans;
|
||
begin
|
||
fFilePath := WJPach.Text;
|
||
fFileName := WJName.Text;
|
||
with adoqueryCmd do
|
||
begin
|
||
close;
|
||
sql.Clear;
|
||
sql.Add('select TFId from TP_File ');
|
||
sql.Add('where WBID=''' + trim(Order_Main.fieldbyname('RKNo').AsString) + '''');
|
||
sql.Add(' and TFType=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
sql.Add(' and FileName=' + quotedstr(trim(fFileName)));
|
||
open;
|
||
end;
|
||
if ADOQueryCmd.IsEmpty = False then
|
||
begin
|
||
ADOQueryCmd.Connection.RollbackTrans;
|
||
application.MessageBox('<27>˸<EFBFBD><CBB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD><DEB8>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', MB_ICONERROR);
|
||
exit;
|
||
end;
|
||
|
||
application.ProcessMessages;
|
||
|
||
if GetLSNo(ADOQueryCmd, maxNo, 'MD', 'TP_File', 4, 1) = False then
|
||
begin
|
||
ADOQueryCmd.Connection.RollbackTrans;
|
||
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
|
||
with adoqueryCmd do
|
||
begin
|
||
close;
|
||
sql.Clear;
|
||
sql.Add('delete from TP_File ');
|
||
sql.Add('where WBID=''' + trim(Order_Main.fieldbyname('RKNo').AsString) + '''');
|
||
sql.Add('and TFType=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
sql.Add('and FileName=' + quotedstr(trim(fFileName)));
|
||
execsql;
|
||
end;
|
||
with adoqueryCmd do
|
||
begin
|
||
close;
|
||
sql.Clear;
|
||
sql.Add('select * from TP_File ');
|
||
sql.Add('where WBID=''' + trim(Order_Main.fieldbyname('RKNo').AsString) + '''');
|
||
sql.Add('and TFType=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
sql.Add('and FileName=' + quotedstr(trim(fFileName)));
|
||
open;
|
||
append;
|
||
fieldbyname('TFID').Value := trim(maxNo);
|
||
fieldbyname('WBID').Value := trim(Order_Main.fieldbyname('RKNo').AsString);
|
||
fieldbyname('TFType').Value := '<27>ɹ<EFBFBD><C9B9><EFBFBD>';
|
||
fieldbyname('FileName').Value := trim(fFileName);
|
||
post;
|
||
end;
|
||
if fFilePath <> '' then
|
||
begin
|
||
try
|
||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ', '127.0.0.1');
|
||
IdFTP1.Username := 'three';
|
||
IdFTP1.Password := '641010';
|
||
IdFTP1.Connect();
|
||
IdFTP1.Put(fFilePath, 'FJ\' + Trim(fFileName));
|
||
IdFTP1.Quit;
|
||
except
|
||
IdFTP1.Quit;
|
||
Application.MessageBox('<27>ϴ<EFBFBD><CFB4>ļ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', MB_ICONWARNING);
|
||
end;
|
||
end;
|
||
IdFTP1.Quit;
|
||
Initimage();
|
||
end;
|
||
adoqueryCmd.Connection.CommitTrans;
|
||
except
|
||
adoqueryCmd.Connection.RollbackTrans;
|
||
application.MessageBox('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.Button8Click(Sender: TObject);
|
||
var
|
||
fFileName: string;
|
||
begin
|
||
fFileName := WJName.Hint;
|
||
with ADOQueryCmd do
|
||
begin
|
||
close;
|
||
sql.Clear;
|
||
sql.Add('UPdate TP_File Set FileName=''' + Trim(WJName.Text) + '''');
|
||
sql.Add('where WBID=''' + trim(Order_Main.fieldbyname('RKNo').AsString) + '''');
|
||
sql.Add('and TFType=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
sql.Add('and FileName=' + quotedstr(trim(fFileName)));
|
||
execsql;
|
||
end;
|
||
Panel12.Visible := False;
|
||
Initimage();
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.Button7Click(Sender: TObject);
|
||
var
|
||
fFileName: string;
|
||
fFilePath: string;
|
||
maxNo: string;
|
||
begin
|
||
try
|
||
adoqueryCmd.Connection.BeginTrans;
|
||
fFilePath := WJPach.Text;
|
||
fFileName := WJName.Hint;
|
||
with adoqueryCmd do
|
||
begin
|
||
close;
|
||
sql.Clear;
|
||
sql.Add('select TFId from TP_File ');
|
||
sql.Add('where WBID=''' + trim(Order_Main.fieldbyname('RKNo').AsString) + '''');
|
||
sql.Add('and TFType=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
sql.Add('and FileName=' + quotedstr(trim(fFileName)));
|
||
open;
|
||
if not adoqueryCmd.IsEmpty then
|
||
begin
|
||
ADOQueryCmd.Connection.RollbackTrans;
|
||
application.MessageBox('<27>˸<EFBFBD><CBB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD><DEB8>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', MB_ICONERROR);
|
||
exit;
|
||
end;
|
||
end;
|
||
//Panel12.Visible:=False;
|
||
//Panel2.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>Ե<EFBFBD>...';
|
||
//Panel2.Visible:=true;
|
||
application.ProcessMessages;
|
||
|
||
if GetLSNo(ADOQueryCmd, maxNo, 'FJ', 'TP_File', 4, 1) = False then
|
||
begin
|
||
ADOQueryCmd.Connection.RollbackTrans;
|
||
Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
|
||
Exit;
|
||
end;
|
||
|
||
with adoqueryCmd do
|
||
begin
|
||
close;
|
||
sql.Clear;
|
||
sql.Add('delete from TP_File ');
|
||
sql.Add('where WBID=''' + trim(Order_Main.fieldbyname('RKNo').AsString) + '''');
|
||
sql.Add('and TFType=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
sql.Add('and FileName=' + quotedstr(trim(fFileName)));
|
||
execsql;
|
||
end;
|
||
with adoqueryCmd do
|
||
begin
|
||
close;
|
||
sql.Clear;
|
||
sql.Add('select * from TP_File ');
|
||
sql.Add('where WBID=''' + trim(Order_Main.fieldbyname('RKNo').AsString) + '''');
|
||
sql.Add('and TFType=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
sql.Add('and FileName=' + quotedstr(trim(fFileName)));
|
||
open;
|
||
append;
|
||
fieldbyname('TFID').Value := trim(maxNo);
|
||
fieldbyname('WBID').Value := trim(Order_Main.fieldbyname('RKNo').AsString);
|
||
fieldbyname('TFType').Value := '<27>ɹ<EFBFBD><C9B9><EFBFBD>';
|
||
fieldbyname('FileName').Value := trim(fFileName);
|
||
post;
|
||
end;
|
||
if fFilePath <> '' then
|
||
begin
|
||
try
|
||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ', '127.0.0.1');
|
||
IdFTP1.Username := 'three';
|
||
IdFTP1.Password := '641010';
|
||
IdFTP1.Connect();
|
||
IdFTP1.Put(fFilePath, 'FJ\' + Trim(fFileName));
|
||
IdFTP1.Quit;
|
||
except
|
||
IdFTP1.Quit;
|
||
Application.MessageBox('<27>ϴ<EFBFBD><CFB4>ļ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', MB_ICONWARNING);
|
||
end;
|
||
end;
|
||
IdFTP1.Quit;
|
||
//Panel2.Visible:=false;
|
||
Initimage();
|
||
adoqueryCmd.Connection.CommitTrans;
|
||
except
|
||
adoqueryCmd.Connection.RollbackTrans;
|
||
application.MessageBox('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ<EFBFBD><CABE>Ϣ', 0);
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.Image1Click(Sender: TObject);
|
||
begin
|
||
Panel12.Visible := false;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.MenuItem1Click(Sender: TObject);
|
||
var
|
||
OpenDiaLog: TOpenDialog;
|
||
fFileName: string;
|
||
fFilePath: string;
|
||
begin
|
||
OpenDiaLog := TOpenDialog.Create(Self);
|
||
if OpenDiaLog.Execute then
|
||
begin
|
||
fFilePath := OpenDiaLog.FileName;
|
||
fFileName := ExtractFileName(OpenDiaLog.FileName);
|
||
Panel12.Visible := True;
|
||
WJName.Text := Trim(fFileName);
|
||
WJName.Hint := Trim(fFileName);
|
||
WJPach.Text := fFilePath;
|
||
Button8.Visible := False;
|
||
Button4.Visible := True;
|
||
Button7.Visible := True;
|
||
Panel12.Refresh;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.N3Click(Sender: TObject);
|
||
var
|
||
fFileName: string;
|
||
begin
|
||
if listView1.SelCount < 1 then
|
||
exit;
|
||
fFileName := ListView1.Selected.Caption;
|
||
with ADOQueryCmd do
|
||
begin
|
||
close;
|
||
sql.Clear;
|
||
sql.Add('delete from TP_File ');
|
||
sql.Add('where WBID=''' + trim(Order_Main.fieldbyname('RKNo').AsString) + '''');
|
||
sql.Add('and TFType=''<27>ɹ<EFBFBD><C9B9><EFBFBD>''');
|
||
sql.Add('and FileName=' + quotedstr(trim(fFileName)));
|
||
execsql;
|
||
end;
|
||
Initimage();
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.Image3Click(Sender: TObject);
|
||
begin
|
||
cxGroupBox2.Visible := false;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.ListView1DblClick(Sender: TObject);
|
||
var
|
||
sFieldName: string;
|
||
fileName: string;
|
||
begin
|
||
if ListView1.Items.Count < 1 then
|
||
EXIT;
|
||
|
||
if listView1.SelCount < 1 then
|
||
exit;
|
||
sFieldName := leftbstr(ExtractFilePath(Application.ExeName), 1) + ':\ͼƬ<CDBC>鿴';
|
||
|
||
if not DirectoryExists(pchar(sFieldName)) then
|
||
CreateDirectory(pchar(sFieldName), nil);
|
||
|
||
fileName := ListView1.Selected.Caption;
|
||
|
||
sFieldName := sFieldName + '\' + trim(fileName);
|
||
|
||
try
|
||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ', '127.0.0.1');
|
||
IdFTP1.Username := 'three';
|
||
IdFTP1.Password := '641010';
|
||
IdFTP1.Connect();
|
||
except
|
||
;
|
||
end;
|
||
|
||
if IdFTP1.Connected then
|
||
begin
|
||
|
||
// Panel2.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>Ե<EFBFBD>...';
|
||
//Panel2.Visible:=true;
|
||
application.ProcessMessages;
|
||
try
|
||
IdFTP1.Get('FJ\' + Trim(fileName), sFieldName, true, false);
|
||
except
|
||
//Panel2.Visible:=false;
|
||
Application.MessageBox('<27>ͻ<EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', MB_ICONWARNING);
|
||
IdFTP1.Quit;
|
||
Exit;
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
// Panel2.Visible:=false;
|
||
Application.MessageBox('<27><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', MB_ICONWARNING);
|
||
IdFTP1.Quit;
|
||
Exit;
|
||
end;
|
||
//Panel2.Visible:=false;
|
||
if IdFTP1.Connected then
|
||
IdFTP1.Quit;
|
||
ShellExecute(Handle, 'open', PChar(sFieldName), '', '', SW_SHOWNORMAL);
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.N4Click(Sender: TObject);
|
||
var
|
||
SaveDialog: TSaveDialog;
|
||
fFileName: string;
|
||
fFilePath: string;
|
||
begin
|
||
if listView1.SelCount < 1 then
|
||
exit;
|
||
try
|
||
fFileName := ListView1.Selected.Caption;
|
||
SaveDialog := TSaveDialog.Create(Self);
|
||
SaveDialog.FileName := fFileName;
|
||
if SaveDialog.Execute then
|
||
begin
|
||
Panel3.Caption := '<27><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>Ե<EFBFBD>...';
|
||
Panel3.Visible := true;
|
||
application.ProcessMessages;
|
||
fFilePath := SaveDialog.FileName;
|
||
try
|
||
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', 'FTP<54><50>ַ', '127.0.0.1');
|
||
;
|
||
IdFTP1.Username := 'three';
|
||
IdFTP1.Password := '641010';
|
||
IdFTP1.Connect();
|
||
except
|
||
;
|
||
end;
|
||
|
||
if IdFTP1.Connected then
|
||
begin
|
||
Panel3.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>Ե<EFBFBD>...';
|
||
Panel3.Visible := true;
|
||
application.ProcessMessages;
|
||
try
|
||
IdFTP1.Get('FJ\' + Trim(fFileName), fFilePath, false, true);
|
||
except
|
||
Panel3.Visible := false;
|
||
Application.MessageBox('<27>ͻ<EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', MB_ICONWARNING);
|
||
IdFTP1.Quit;
|
||
Exit;
|
||
end;
|
||
end
|
||
else
|
||
begin
|
||
Panel3.Visible := false;
|
||
Application.MessageBox('<27><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', MB_ICONWARNING);
|
||
IdFTP1.Quit;
|
||
Exit;
|
||
end;
|
||
Panel3.Visible := false;
|
||
if IdFTP1.Connected then
|
||
IdFTP1.Quit;
|
||
end;
|
||
except
|
||
Panel3.Visible := false;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.MenuItem2Click(Sender: TObject);
|
||
begin
|
||
if listView1.SelCount < 1 then
|
||
exit;
|
||
Panel12.Visible := True;
|
||
Button4.Visible := False;
|
||
Button7.Visible := False;
|
||
Button8.Visible := True;
|
||
Panel12.Refresh;
|
||
WJName.Text := Trim(ListView1.Selected.Caption);
|
||
WJName.Hint := Trim(ListView1.Selected.Caption);
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.ToolButton2Click(Sender: TObject);
|
||
var
|
||
FKHName, FKHNO: string;
|
||
begin
|
||
try
|
||
frmLLRKInPutMH_MTHCK := TfrmLLRKInPutMH_MTHCK.Create(Self);
|
||
with frmLLRKInPutMH_MTHCK do
|
||
begin
|
||
PState := 0;
|
||
FMainId := '';
|
||
FMYType := '<27>˻<EFBFBD><CBBB><EFBFBD>';
|
||
FMYTypeFlag := 'CGH';
|
||
labMYType.Caption := '(<28><>)<29>˻<EFBFBD>';
|
||
FML := '<27><>';
|
||
frmLLRKInPutMH_MTHCK.KHName.Text := Trim(Order_Main.fieldbyname('KHName').AsString);
|
||
frmLLRKInPutMH_MTHCK.KHNo.Text := Trim(Order_Main.fieldbyname('KHNo').AsString);
|
||
frmLLRKInPutMH_MTHCK.MYName.Text := Trim(Order_Main.fieldbyname('MYName').AsString);
|
||
frmLLRKInPutMH_MTHCK.MYCode.Text := Trim(Order_Main.fieldbyname('MYCode').AsString);
|
||
frmLLRKInPutMH_MTHCK.MYKZ.Text := Trim(Order_Main.fieldbyname('MYKZ').AsString);
|
||
frmLLRKInPutMH_MTHCK.MYMF.Text := Trim(Order_Main.fieldbyname('MYMF').AsString);
|
||
frmLLRKInPutMH_MTHCK.GFOrderNo.Text := Trim(Order_Main.fieldbyname('GFOrderNo').AsString);
|
||
frmLLRKInPutMH_MTHCK.PS.Text := Trim(Order_Main.fieldbyname('PS').AsString);
|
||
frmLLRKInPutMH_MTHCK.MDJChang.Text := Trim(Order_Main.fieldbyname('MDJChang').AsString);
|
||
frmLLRKInPutMH_MTHCK.MDKGFlag.Checked := Order_Main.fieldbyname('MDKGFlag').AsBoolean;
|
||
frmLLRKInPutMH_MTHCK.MDMFlag.Checked := Order_Main.fieldbyname('MDMFlag').AsBoolean;
|
||
frmLLRKInPutMH_MTHCK.HSFlag.Checked := Order_Main.fieldbyname('HSFlag').AsBoolean;
|
||
frmLLRKInPutMH_MTHCK.BHSFlag.Checked := Order_Main.fieldbyname('BHSFlag').AsBoolean;
|
||
frmLLRKInPutMH_MTHCK.MYMDPrice.Text := Order_Main.fieldbyname('MYMDPrice').asstring;
|
||
frmLLRKInPutMH_MTHCK.Price.Text := floattostr(Order_Main.fieldbyname('Price').asfloat);
|
||
frmLLRKInPutMH_MTHCK.FFZMYID := Order_Main.fieldbyname('FZMYID').asstring;
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPutMH_MTHCK.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.N5Click(Sender: TObject);
|
||
var
|
||
FFMYType: string;
|
||
begin
|
||
if Order_Main.IsEmpty then
|
||
Exit;
|
||
try
|
||
frmLLRKInPutMH_MCG := TfrmLLRKInPutMH_MCG.Create(Application);
|
||
with frmLLRKInPutMH_MCG do
|
||
begin
|
||
PState := 3;
|
||
FMainId := Trim(Self.Order_Main.fieldbyname('RKNo').AsString);
|
||
FSubid := 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 := '(<28><>)<29>ɹ<EFBFBD>';
|
||
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
SJLX := '<27><>';
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
SJLX := '<27><>';
|
||
|
||
//Panel5.Visible:=false;
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPutMH_MCG.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.N6Click(Sender: TObject);
|
||
var
|
||
FFMYType: string;
|
||
begin
|
||
if Order_Main.IsEmpty then
|
||
Exit;
|
||
if Trim(Order_Main.fieldbyname('CRType').AsString) = '<27>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>' then
|
||
begin
|
||
try
|
||
frmLLRKInPutMH_MCG := TfrmLLRKInPutMH_MCG.Create(Application);
|
||
with frmLLRKInPutMH_MCG do
|
||
begin
|
||
PState := 2;
|
||
FMainId := Trim(Self.Order_Main.fieldbyname('RKNo').AsString);
|
||
FSubid := 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 := '(<28><>)<29>ɹ<EFBFBD>';
|
||
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
SJLX := '<27><>';
|
||
if self.caption = '<27>ɹ<DEB2><C9B9><EFBFBD><EFBFBD><EFBFBD> (<28><>)' then
|
||
SJLX := '<27><>';
|
||
//Panel5.Visible:=false;
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPutMH_MCG.Free;
|
||
end;
|
||
end
|
||
else if Trim(Order_Main.fieldbyname('CRType').AsString) = '<27>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD>' then
|
||
begin
|
||
try
|
||
frmLLRKInPutMH_MPD := TfrmLLRKInPutMH_MPD.Create(Application);
|
||
with frmLLRKInPutMH_MPD do
|
||
begin
|
||
PState := 2;
|
||
FMainId := Trim(Self.Order_Main.fieldbyname('RKNo').AsString);
|
||
FSubid := 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 := '(<28><>)<29>̵<EFBFBD>';
|
||
//Panel5.Visible:=false;
|
||
if ShowModal = 1 then
|
||
begin
|
||
InitGrid();
|
||
end;
|
||
end;
|
||
finally
|
||
frmLLRKInPutMH_MPD.Free;
|
||
end;
|
||
end;
|
||
|
||
end;
|
||
|
||
procedure TfrmMCGRKList.ToolButton3Click(Sender: TObject);
|
||
begin
|
||
try
|
||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||
with frmZDYHelp do
|
||
begin
|
||
Flag := 'JSXS';
|
||
flagname := '<27><><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>';
|
||
fnote := True;
|
||
V1Name.Caption := '<27><><EFBFBD><EFBFBD>';
|
||
V1Note.Caption := '<27><>/<2F><>';
|
||
if ShowModal = 1 then
|
||
begin
|
||
|
||
end;
|
||
end;
|
||
finally
|
||
frmZDYHelp.Free;
|
||
end;
|
||
end;
|
||
|
||
end.
|
||
|