1183 lines
34 KiB
ObjectPascal
1183 lines
34 KiB
ObjectPascal
|
|
unit U_OrderHSList;
|
|||
|
|
|
|||
|
|
interface
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|||
|
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
|
|||
|
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
|
|||
|
|
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
|
|||
|
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
|
|||
|
|
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
|
|||
|
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
|||
|
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
|||
|
|
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, jpeg, U_SLT, ComObj, Menus,
|
|||
|
|
cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, cxNavigator,
|
|||
|
|
cxGridBandedTableView, cxGridDBBandedTableView, OleServer, ExcelXP, RM_e_Xls,
|
|||
|
|
dxBarBuiltInMenu, cxPC, BtnEdit, cxCalendar, 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
|
|||
|
|
FdDy = record
|
|||
|
|
inc: integer; //<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><D7BD>־<EFBFBD><D6BE><EFBFBD>
|
|||
|
|
FDdys: string[32]; //<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><D7BD><EFBFBD>
|
|||
|
|
FdDysName: string[32]; //<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><D7BD><EFBFBD>
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
TfrmOrderHSList = class(TForm)
|
|||
|
|
ToolBar1: TToolBar;
|
|||
|
|
TBRafresh: TToolButton;
|
|||
|
|
TBDel: TToolButton;
|
|||
|
|
TBClose: TToolButton;
|
|||
|
|
ADOQueryTemp: TADOQuery;
|
|||
|
|
ADOQueryCmd: TADOQuery;
|
|||
|
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
|||
|
|
cxGrid1Level1: TcxGridLevel;
|
|||
|
|
cxGrid1: TcxGrid;
|
|||
|
|
Panel1: TPanel;
|
|||
|
|
TBFilter: TToolButton;
|
|||
|
|
DataSource1: TDataSource;
|
|||
|
|
ADOQueryMain: TADOQuery;
|
|||
|
|
CDS_Main: TClientDataSet;
|
|||
|
|
TBExport: TToolButton;
|
|||
|
|
TBPRT: TToolButton;
|
|||
|
|
RM1: TRMGridReport;
|
|||
|
|
RMDB_Main: TRMDBDataSet;
|
|||
|
|
ODPat: TOpenDialog;
|
|||
|
|
IdFTP1: TIdFTP;
|
|||
|
|
SaveDialog1: TSaveDialog;
|
|||
|
|
Label3: TLabel;
|
|||
|
|
OrderNOHZ: TEdit;
|
|||
|
|
Panel2: TPanel;
|
|||
|
|
Label11: TLabel;
|
|||
|
|
Label12: TLabel;
|
|||
|
|
Panel3: TPanel;
|
|||
|
|
adoqueryPicture: TADOQuery;
|
|||
|
|
Label4: TLabel;
|
|||
|
|
KHName: TEdit;
|
|||
|
|
TBAdd: TToolButton;
|
|||
|
|
TBEdit: TToolButton;
|
|||
|
|
Label1: TLabel;
|
|||
|
|
YWY: TEdit;
|
|||
|
|
Label5: TLabel;
|
|||
|
|
Lidan: TEdit;
|
|||
|
|
OpenDialog1: TOpenDialog;
|
|||
|
|
Tv1: TcxGridDBBandedTableView;
|
|||
|
|
Tv1Column1: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column2: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column3: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column4: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column5: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column6: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column7: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column8: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column9: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column10: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column11: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column12: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column13: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column14: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column15: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column16: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column17: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column18: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column19: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column20: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column21: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column22: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column23: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column24: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column25: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column26: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column27: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column28: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column29: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column30: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column31: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column32: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column33: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column34: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column35: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column36: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column38: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column39: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column40: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column41: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column42: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column44: TcxGridDBBandedColumn;
|
|||
|
|
Label2: TLabel;
|
|||
|
|
Label6: TLabel;
|
|||
|
|
BegDate: TDateTimePicker;
|
|||
|
|
EndDate: TDateTimePicker;
|
|||
|
|
Tv1Column43: TcxGridDBBandedColumn;
|
|||
|
|
RMXLSExport1: TRMXLSExport;
|
|||
|
|
Tv1Column45: TcxGridDBBandedColumn;
|
|||
|
|
cxTabControl1: TcxTabControl;
|
|||
|
|
cxTabControl2: TcxTabControl;
|
|||
|
|
cxTabControl3: TcxTabControl;
|
|||
|
|
TBChk: TToolButton;
|
|||
|
|
TBChkCX: TToolButton;
|
|||
|
|
TBHD: TToolButton;
|
|||
|
|
TBHDCX: TToolButton;
|
|||
|
|
TBTJ: TToolButton;
|
|||
|
|
TBTJCX: TToolButton;
|
|||
|
|
Tv1Column46: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column47: TcxGridDBBandedColumn;
|
|||
|
|
Panel4: TPanel;
|
|||
|
|
Label7: TLabel;
|
|||
|
|
Chker: TBtnEditA;
|
|||
|
|
Tv1Column48: TcxGridDBBandedColumn;
|
|||
|
|
TBAddTS: TToolButton;
|
|||
|
|
Tv1Column49: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column50: TcxGridDBBandedColumn;
|
|||
|
|
Panel5: TPanel;
|
|||
|
|
Panel6: TPanel;
|
|||
|
|
Panel7: TPanel;
|
|||
|
|
Panel8: TPanel;
|
|||
|
|
Panel9: TPanel;
|
|||
|
|
Tv1Column51: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column52: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column37: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column53: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column54: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column55: TcxGridDBBandedColumn;
|
|||
|
|
PopupMenu1: TPopupMenu;
|
|||
|
|
N1: TMenuItem;
|
|||
|
|
N2: TMenuItem;
|
|||
|
|
TBBH: TToolButton;
|
|||
|
|
Panel10: TPanel;
|
|||
|
|
BHNote: TEdit;
|
|||
|
|
Label8: TLabel;
|
|||
|
|
Button1: TButton;
|
|||
|
|
Button2: TButton;
|
|||
|
|
Tv1Column56: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column57: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column58: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column59: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column60: TcxGridDBBandedColumn;
|
|||
|
|
Tv1Column61: TcxGridDBBandedColumn;
|
|||
|
|
ToolButton1: TToolButton;
|
|||
|
|
procedure FormDestroy(Sender: TObject);
|
|||
|
|
procedure TBCloseClick(Sender: TObject);
|
|||
|
|
procedure TBDelClick(Sender: TObject);
|
|||
|
|
procedure FormShow(Sender: TObject);
|
|||
|
|
procedure cxDBTreeList1DblClick(Sender: TObject);
|
|||
|
|
procedure TBRafreshClick(Sender: TObject);
|
|||
|
|
procedure TBFilterClick(Sender: TObject);
|
|||
|
|
procedure OrderNOHZChange(Sender: TObject);
|
|||
|
|
procedure TBExportClick(Sender: TObject);
|
|||
|
|
procedure TBPRTClick(Sender: TObject);
|
|||
|
|
procedure TBAddClick(Sender: TObject);
|
|||
|
|
procedure TBEditClick(Sender: TObject);
|
|||
|
|
procedure Tv1DblClick(Sender: TObject);
|
|||
|
|
procedure cxTabControl1Change(Sender: TObject);
|
|||
|
|
procedure TBHDClick(Sender: TObject);
|
|||
|
|
procedure TBHDCXClick(Sender: TObject);
|
|||
|
|
procedure TBChkClick(Sender: TObject);
|
|||
|
|
procedure TBChkCXClick(Sender: TObject);
|
|||
|
|
procedure ChkerBtnClick(Sender: TObject);
|
|||
|
|
procedure TBTJClick(Sender: TObject);
|
|||
|
|
procedure TBTJCXClick(Sender: TObject);
|
|||
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|||
|
|
procedure TBAddTSClick(Sender: TObject);
|
|||
|
|
procedure Tv1Column42CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
|||
|
|
procedure Panel5Click(Sender: TObject);
|
|||
|
|
procedure N1Click(Sender: TObject);
|
|||
|
|
procedure N2Click(Sender: TObject);
|
|||
|
|
procedure Button2Click(Sender: TObject);
|
|||
|
|
procedure Button1Click(Sender: TObject);
|
|||
|
|
procedure TBBHClick(Sender: TObject);
|
|||
|
|
procedure ToolButton1Click(Sender: TObject);
|
|||
|
|
private
|
|||
|
|
{ Private declarations }
|
|||
|
|
procedure SetJurisdiction();
|
|||
|
|
procedure InitGrid(GJFW: string);
|
|||
|
|
procedure ReadINIFile();
|
|||
|
|
procedure SelExportDatae(FTv: TcxGridDBBandedTableView; cds_Main: TClientDataSet; FTile: string);
|
|||
|
|
public
|
|||
|
|
canshu1: string;
|
|||
|
|
dFdDy: array[0..20] of FdDy; //<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
{ Public declarations }
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
//var
|
|||
|
|
// frmCPManage: TfrmCPManage;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
U_DataLink, U_RTFun, U_FileUp, U_OrderHSInPut, U_ZDYHelp, U_OrderHSInPutTS,
|
|||
|
|
U_SelExportField, U_Fun;
|
|||
|
|
|
|||
|
|
{$R *.dfm}
|
|||
|
|
procedure TfrmOrderHSList.SetJurisdiction();
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
cxTabControl1.Visible := False;
|
|||
|
|
cxTabControl2.Visible := False;
|
|||
|
|
cxTabControl3.Visible := False;
|
|||
|
|
|
|||
|
|
if canshu1 = '<27><><EFBFBD><EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
TBAdd.Visible := true;
|
|||
|
|
TBAddTS.Visible := true;
|
|||
|
|
TBEdit.Visible := true;
|
|||
|
|
TBDel.Visible := true;
|
|||
|
|
TBExport.Visible := true;
|
|||
|
|
TBPRT.Visible := False;
|
|||
|
|
TBTJ.Visible := False;
|
|||
|
|
TBTJCX.Visible := False;
|
|||
|
|
Panel4.Visible := False;
|
|||
|
|
TBChk.Visible := False;
|
|||
|
|
TBChkCX.Visible := False;
|
|||
|
|
TBBH.Visible := False;
|
|||
|
|
TBHD.Visible := False;
|
|||
|
|
TBHDCX.Visible := False;
|
|||
|
|
end
|
|||
|
|
else if canshu1 = '<27>Ǽ<EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
TBAdd.Visible := true;
|
|||
|
|
TBAddTS.Visible := False;
|
|||
|
|
TBEdit.Visible := true;
|
|||
|
|
TBDel.Visible := true;
|
|||
|
|
TBPRT.Visible := False;
|
|||
|
|
cxTabControl1.Visible := True;
|
|||
|
|
TBTJ.Visible := True;
|
|||
|
|
TBTJCX.Visible := True;
|
|||
|
|
Panel4.Visible := True;
|
|||
|
|
TBChk.Visible := False;
|
|||
|
|
TBChkCX.Visible := False;
|
|||
|
|
TBBH.Visible := False;
|
|||
|
|
TBHD.Visible := False;
|
|||
|
|
TBHDCX.Visible := False;
|
|||
|
|
ToolBar1.Refresh;
|
|||
|
|
end
|
|||
|
|
else if canshu1 = 'ͳ<><CDB3>' then
|
|||
|
|
begin
|
|||
|
|
TBAdd.Visible := False;
|
|||
|
|
TBAddTS.Visible := true;
|
|||
|
|
TBEdit.Visible := true;
|
|||
|
|
TBDel.Visible := true;
|
|||
|
|
TBPRT.Visible := False;
|
|||
|
|
cxTabControl1.Visible := True;
|
|||
|
|
TBTJ.Visible := True;
|
|||
|
|
TBTJCX.Visible := True;
|
|||
|
|
Panel4.Visible := True;
|
|||
|
|
TBChk.Visible := False;
|
|||
|
|
TBChkCX.Visible := False;
|
|||
|
|
TBBH.Visible := False;
|
|||
|
|
TBHD.Visible := False;
|
|||
|
|
TBHDCX.Visible := False;
|
|||
|
|
ToolBar1.Refresh;
|
|||
|
|
end
|
|||
|
|
else if canshu1 = '<27><><EFBFBD><EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
TBAdd.Visible := false;
|
|||
|
|
TBAddTS.Visible := False;
|
|||
|
|
TBEdit.Visible := false;
|
|||
|
|
TBDel.Visible := false;
|
|||
|
|
TBExport.Visible := false;
|
|||
|
|
TBPRT.Visible := False;
|
|||
|
|
cxTabControl2.Visible := True;
|
|||
|
|
TBChk.Visible := True;
|
|||
|
|
TBChkCX.Visible := True;
|
|||
|
|
TBBH.Visible := True;
|
|||
|
|
TBTJ.Visible := False;
|
|||
|
|
TBTJCX.Visible := False;
|
|||
|
|
Panel4.Visible := False;
|
|||
|
|
TBHD.Visible := False;
|
|||
|
|
TBHDCX.Visible := False;
|
|||
|
|
end
|
|||
|
|
else if canshu1 = '<27>˶<EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
TBAdd.Visible := false;
|
|||
|
|
TBAddTS.Visible := False;
|
|||
|
|
TBEdit.Visible := false;
|
|||
|
|
TBDel.Visible := false;
|
|||
|
|
TBExport.Visible := false;
|
|||
|
|
TBPRT.Visible := False;
|
|||
|
|
cxTabControl3.Visible := True;
|
|||
|
|
TBHD.Visible := True;
|
|||
|
|
TBHDCX.Visible := True;
|
|||
|
|
TBTJ.Visible := False;
|
|||
|
|
TBTJCX.Visible := False;
|
|||
|
|
Panel4.Visible := False;
|
|||
|
|
TBChk.Visible := False;
|
|||
|
|
TBChkCX.Visible := False;
|
|||
|
|
TBBH.Visible := False;
|
|||
|
|
end
|
|||
|
|
else if canshu1 = '<27><>ѯ' then
|
|||
|
|
begin
|
|||
|
|
TBAdd.Visible := false;
|
|||
|
|
TBAddTS.Visible := False;
|
|||
|
|
TBEdit.Visible := false;
|
|||
|
|
TBDel.Visible := false;
|
|||
|
|
TBExport.Visible := false;
|
|||
|
|
TBPRT.Visible := False;
|
|||
|
|
TBHD.Visible := False;
|
|||
|
|
TBHDCX.Visible := False;
|
|||
|
|
TBTJ.Visible := False;
|
|||
|
|
TBTJCX.Visible := False;
|
|||
|
|
Panel4.Visible := False;
|
|||
|
|
TBChk.Visible := False;
|
|||
|
|
TBChkCX.Visible := False;
|
|||
|
|
TBBH.Visible := False;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.InitGrid(GJFW: string);
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
try
|
|||
|
|
ADOQueryMain.DisableControls;
|
|||
|
|
with ADOQueryMain do
|
|||
|
|
begin
|
|||
|
|
Filtered := False;
|
|||
|
|
Close;
|
|||
|
|
SQL.Clear;
|
|||
|
|
SQL.Add('select A.*');
|
|||
|
|
sql.Add(',Case when isnull(CPPS,0)>0 then DJFee/CPPS else null end as mpdjf ');
|
|||
|
|
sql.Add(',Case when isnull(XSQty,0)>0 then XSMoneyRMB/XSQty else null end as pjdj ');
|
|||
|
|
sql.Add(',Case when isnull(BZType,'''')=''<27><>'' then XSMoney else null end as XSMoneyMY ');
|
|||
|
|
sql.Add(',Case when isnull(BZType,'''')=''<27>'' then XSMoney else null end as XSMoneyOY ');
|
|||
|
|
sql.Add(',Case when isnull(BZType,'''')=''<27><>'' then XSMoney else null end as XSMoneyZY ');
|
|||
|
|
sql.Add(',Case when isnull(BZType,'''')=''<27><>'' then XSMoneyHZ else null end as XSMoneyHZMY ');
|
|||
|
|
sql.Add(',Case when isnull(BZType,'''')=''<27>'' then XSMoneyHZ else null end as XSMoneyHZOY ');
|
|||
|
|
sql.Add(',Case when isnull(BZType,'''')=''<27><>'' then XSMoneyHZ else null end as XSMoneyHZZY ');
|
|||
|
|
SQL.Add(' from Order_HS A where XDDate>=:begdate and XDDate<:Enddate and Valid=''Y''');
|
|||
|
|
Parameters.ParamByName('begdate').Value := FormatDateTime('yyyy-MM-dd', BegDate.Date);
|
|||
|
|
Parameters.ParamByName('Enddate').Value := FormatDateTime('yyyy-MM-dd', EndDate.Date + 1);
|
|||
|
|
if cxTabControl1.Visible = True then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and Filler=''' + Trim(DName) + '''');
|
|||
|
|
if cxTabControl1.TabIndex = 0 then
|
|||
|
|
begin
|
|||
|
|
// Parameters.ParamByName('begdate').Value := '2000-01-01';
|
|||
|
|
// Parameters.ParamByName('Enddate').Value := '2500-01-01';
|
|||
|
|
Parameters.ParamByName('begdate').Value := FormatDateTime('yyyy-MM-dd', BegDate.DateTime);
|
|||
|
|
Parameters.ParamByName('enddate').Value := FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1);
|
|||
|
|
sql.Add(' and isnull(TJFlag,0)=0');
|
|||
|
|
end
|
|||
|
|
else if cxTabControl1.TabIndex = 1 then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(TJFlag,0)=1 and isnull(ChkFlag,0)=0 ');
|
|||
|
|
end
|
|||
|
|
else if cxTabControl1.TabIndex = 2 then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(TJFlag,0)=1 and isnull(ChkFlag,0)=1 ');
|
|||
|
|
end
|
|||
|
|
else if cxTabControl1.TabIndex = 3 then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(HDFlag,0)=1');
|
|||
|
|
|
|||
|
|
end
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
if cxTabControl2.Visible = True then
|
|||
|
|
begin
|
|||
|
|
// sql.Add(' and isnull(TJFlag,0)=1');
|
|||
|
|
sql.Add(' and isnull(TJChker,'''')=''' + Trim(DName) + '''');
|
|||
|
|
if cxTabControl2.TabIndex = 0 then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(TJFlag,0)=1');
|
|||
|
|
// sql.Add(' and isnull(TJChker,'''')=''' + Trim(DName) + '''');
|
|||
|
|
Parameters.ParamByName('begdate').Value := FormatDateTime('yyyy-MM-dd', BegDate.DateTime);
|
|||
|
|
Parameters.ParamByName('enddate').Value := FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1);
|
|||
|
|
sql.Add(' and isnull(ChkFlag,0)=0');
|
|||
|
|
end
|
|||
|
|
else if cxTabControl2.TabIndex = 1 then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(TJFlag,0)=1');
|
|||
|
|
// sql.Add(' and isnull(TJChker,'''')=''' + Trim(DName) + '''');
|
|||
|
|
sql.Add(' and isnull(ChkFlag,0)=1');
|
|||
|
|
|
|||
|
|
end
|
|||
|
|
else if cxTabControl2.TabIndex = 2 then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(ChkFlag,0)=1');
|
|||
|
|
// sql.Add(' and isnull(TJChker,'''')=''' + Trim(DName) + '''');
|
|||
|
|
Parameters.ParamByName('begdate').Value := FormatDateTime('yyyy-MM-dd', BegDate.DateTime);
|
|||
|
|
Parameters.ParamByName('enddate').Value := FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1);
|
|||
|
|
sql.Add(' and isnull(HDFlag,0)=0');
|
|||
|
|
end
|
|||
|
|
else if cxTabControl2.TabIndex = 2 then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(TJFlag,0)=1');
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
if cxTabControl3.Visible = True then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(ChkFlag,0)=1');
|
|||
|
|
if cxTabControl3.TabIndex = 0 then
|
|||
|
|
begin
|
|||
|
|
Parameters.ParamByName('begdate').Value := FormatDateTime('yyyy-MM-dd', BegDate.DateTime);
|
|||
|
|
Parameters.ParamByName('enddate').Value := FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1);
|
|||
|
|
sql.Add(' and isnull(HDFlag,0)=0');
|
|||
|
|
end
|
|||
|
|
else if cxTabControl3.TabIndex = 1 then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(HDFlag,0)=1');
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
if Trim(canshu1) = '<27><>ѯ' then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(ChkFlag,0)=1');
|
|||
|
|
end;
|
|||
|
|
if Trim(canshu1) = 'ͳ<><CDB3>' then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(HSTYpe,'''')=''ͳ<><CDB3>'' ');
|
|||
|
|
end
|
|||
|
|
else if Trim(canshu1) = '<27>Ǽ<EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
sql.Add(' and isnull(HSTYpe,'''')=''ϸ<><CFB8>'' ');
|
|||
|
|
end;
|
|||
|
|
if GJFW = '<27><>' then
|
|||
|
|
sql.Add(' and isnull(LiRunLv,0)<0');
|
|||
|
|
if GJFW = '<27><>' then
|
|||
|
|
sql.Add(' and isnull(LiRunLv,0)>=0 and isnull(LiRunLv,0)<=5');
|
|||
|
|
if GJFW = '<27><>' then
|
|||
|
|
sql.Add(' and isnull(LiRunLv,0)>5 and isnull(LiRunLv,0)<=10');
|
|||
|
|
if GJFW = '<27><>' then
|
|||
|
|
sql.Add(' and isnull(LiRunLv,0)>10');
|
|||
|
|
|
|||
|
|
// ShowMessage(SQL.Text);
|
|||
|
|
Open;
|
|||
|
|
end;
|
|||
|
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
|||
|
|
SInitCDSData20(ADOQueryMain, CDS_Main);
|
|||
|
|
finally
|
|||
|
|
ADOQueryMain.EnableControls;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.FormDestroy(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
//frmCPManage:=nil;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBCloseClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
WriteCxBandedGrid(self.Caption + '22', Tv1, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
Close;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBDelClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if canshu1 = '<27>Ǽ<EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
if cxTabControl1.TabIndex <> 0 then
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
SQL.Clear;
|
|||
|
|
sql.Add('Update Order_HS Set Valid=''N'',DelTime=getdate(),Deler=''' + Trim(DName) + ''' where HSID=''' + Trim(CDS_Main.fieldbyname('HSID').AsString) + '''');
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.Delete;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.FormShow(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
FYear: string;
|
|||
|
|
FMonth: string;
|
|||
|
|
FDate: TDate;
|
|||
|
|
begin
|
|||
|
|
ReadCxBandedGrid(self.Caption + '22', Tv1, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
|
SetJurisdiction();
|
|||
|
|
FDate := SGetServerDate10(ADOQueryTemp);
|
|||
|
|
FYear := FormatDateTime('yyyy', FDate);
|
|||
|
|
FMonth := FormatDateTime('MM', FDate);
|
|||
|
|
if StrToInt(FMonth) < 2 then
|
|||
|
|
begin
|
|||
|
|
BegDate.Date := StrToDate(IntToStr(strtoint(FYear) - 1) + '-02-01');
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
BegDate.Date := StrToDate(FYear + '-02-01');
|
|||
|
|
end;
|
|||
|
|
endDate.Date := SGetServerDate(ADOQueryTemp);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.cxDBTreeList1DblClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
InitGrid('');
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBRafreshClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
InitGrid('');
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBFilterClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if ADOQueryMain.Active then
|
|||
|
|
begin
|
|||
|
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
|||
|
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
|||
|
|
SInitCDSData20(ADOQueryMain, CDS_Main);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.OrderNOHZChange(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
//if Length(Trim(TEdit(Sender).Text))<4 then Exit;
|
|||
|
|
if ADOQueryMain.Active then
|
|||
|
|
begin
|
|||
|
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
|||
|
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
|||
|
|
SInitCDSData20(ADOQueryMain, CDS_Main);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBExportClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
TcxGridToExcel('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', cxGrid1);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBPRTClick(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
fPrintFile, FFCYID: string;
|
|||
|
|
DPS, i, j: Integer;
|
|||
|
|
Txt, fImagePath: string;
|
|||
|
|
Moudle: THandle;
|
|||
|
|
Makebar: TMakebar;
|
|||
|
|
Mixtext: TMixtext;
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
ExportFtErpFile('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>10.rmf', ADOQueryTemp);
|
|||
|
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>10.rmf';
|
|||
|
|
RMXLSExport1 := TRMXLSExport.Create(RMXLSExport1);
|
|||
|
|
if FileExists(fPrintFile) then
|
|||
|
|
begin
|
|||
|
|
RM1.ShowPrintDialog := False;
|
|||
|
|
RM1.LoadFromFile(fPrintFile);
|
|||
|
|
//RM1.PrintReport;
|
|||
|
|
RM1.ShowReport;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox(PChar('û<><C3BB><EFBFBD><EFBFBD>' + fPrintFile), '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.ReadINIFile();
|
|||
|
|
var
|
|||
|
|
programIni: Tinifile; //<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
|||
|
|
FileName: string;
|
|||
|
|
begin
|
|||
|
|
FileName := ExtractFilePath(Paramstr(0)) + 'SYSTEMSET.INI';
|
|||
|
|
programIni := Tinifile.create(FileName);
|
|||
|
|
server := programIni.ReadString('SERVER', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ', '127.0.0.1');
|
|||
|
|
programIni.Free;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBAddClick(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
i: Integer;
|
|||
|
|
FieldName: string;
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmOrderHSInPut := TfrmOrderHSInPut.Create(Application);
|
|||
|
|
with frmOrderHSInPut do
|
|||
|
|
begin
|
|||
|
|
FCYID := '';
|
|||
|
|
GDFalg := 'N';
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
Self.InitGrid('');
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmOrderHSInPut.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBEditClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if canshu1 = '<27>Ǽ<EFBFBD>' then
|
|||
|
|
begin
|
|||
|
|
if cxTabControl1.TabIndex <> 0 then
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Trim(CDS_Main.fieldbyname('HSTYpe').AsString) = 'ϸ<><CFB8>' then
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmOrderHSInPut := TfrmOrderHSInPut.Create(Application);
|
|||
|
|
with frmOrderHSInPut do
|
|||
|
|
begin
|
|||
|
|
FCYID := Trim(Self.CDS_Main.fieldbyname('HSID').AsString);
|
|||
|
|
GDFalg := 'N';
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
Self.InitGrid('');
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmOrderHSInPut.Free;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else if Trim(CDS_Main.fieldbyname('HSTYpe').AsString) = 'ͳ<><CDB3>' then
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmOrderHSInPutTS := TfrmOrderHSInPutTS.Create(Application);
|
|||
|
|
with frmOrderHSInPutTS do
|
|||
|
|
begin
|
|||
|
|
FCYID := Trim(Self.CDS_Main.fieldbyname('HSID').AsString);
|
|||
|
|
GDFalg := 'N';
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
Self.InitGrid('');
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmOrderHSInPutTS.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.Tv1DblClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if Trim(CDS_Main.fieldbyname('HSTYpe').AsString) = 'ϸ<><CFB8>' then
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmOrderHSInPut := TfrmOrderHSInPut.Create(Application);
|
|||
|
|
with frmOrderHSInPut do
|
|||
|
|
begin
|
|||
|
|
FCYID := Trim(Self.CDS_Main.fieldbyname('HSID').AsString);
|
|||
|
|
TBSave.Visible := False;
|
|||
|
|
TBSel.Visible := False;
|
|||
|
|
cxButton1.Visible := False;
|
|||
|
|
GDFalg := 'N';
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmOrderHSInPut.Free;
|
|||
|
|
end;
|
|||
|
|
end
|
|||
|
|
else if Trim(CDS_Main.fieldbyname('HSTYpe').AsString) = 'ͳ<><CDB3>' then
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmOrderHSInPutTS := TfrmOrderHSInPutTS.Create(Application);
|
|||
|
|
with frmOrderHSInPutTS do
|
|||
|
|
begin
|
|||
|
|
FCYID := Trim(Self.CDS_Main.fieldbyname('HSID').AsString);
|
|||
|
|
TBSave.Visible := False;
|
|||
|
|
TBSel.Visible := False;
|
|||
|
|
cxButton1.Visible := False;
|
|||
|
|
GDFalg := 'N';
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmOrderHSInPutTS.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.cxTabControl1Change(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
InitGrid('');
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBHDClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if cxTabControl3.TabIndex <> 0 then
|
|||
|
|
Exit;
|
|||
|
|
if CDS_Main.Locate('SSel', True, []) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݺ˶<DDBA><CBB6><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
CDS_Main.DisableControls;
|
|||
|
|
with CDS_Main do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while CDS_Main.Locate('SSel', True, []) do
|
|||
|
|
begin
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add(' update Order_HS set HDFlag=1,HDTime=getdate(),HDPerson=''' + Trim(DName) + ''',HZStatus=''<27>Ѻ˶<D1BA>''');
|
|||
|
|
sql.Add(' where HSID=''' + Trim(CDS_Main.fieldbyname('HSID').AsString) + ''' ');
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.Delete;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
except
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>쳣!', '<27><>ʾ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBHDCXClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if cxTabControl3.TabIndex <> 1 then
|
|||
|
|
Exit;
|
|||
|
|
if CDS_Main.Locate('SSel', True, []) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݺ˶Գ<CBB6><D4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
CDS_Main.DisableControls;
|
|||
|
|
with CDS_Main do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while CDS_Main.Locate('SSel', True, []) do
|
|||
|
|
begin
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add(' update Order_HS set HDFlag=0,HDTime=getdate(),HDPerson=''' + Trim(DName) + ''',HZStatus=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' ');
|
|||
|
|
sql.Add(' where HSID=''' + Trim(CDS_Main.fieldbyname('HSID').AsString) + ''' ');
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.Delete;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
except
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>쳣!', '<27><>ʾ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBChkClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if cxTabControl2.TabIndex <> 0 then
|
|||
|
|
Exit;
|
|||
|
|
if CDS_Main.Locate('SSel', True, []) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
CDS_Main.DisableControls;
|
|||
|
|
with CDS_Main do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while CDS_Main.Locate('SSel', True, []) do
|
|||
|
|
begin
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add(' update Order_HS set ChkFlag=1,ChkTime=getdate(),Chker=''' + Trim(DName) + ''',HZStatus=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>''');
|
|||
|
|
sql.Add(' where HSID=''' + Trim(CDS_Main.fieldbyname('HSID').AsString) + ''' ');
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.Delete;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
except
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>쳣!', '<27><>ʾ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBChkCXClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if cxTabControl2.TabIndex <> 1 then
|
|||
|
|
Exit;
|
|||
|
|
if CDS_Main.Locate('SSel', True, []) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
CDS_Main.DisableControls;
|
|||
|
|
with CDS_Main do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while CDS_Main.Locate('SSel', True, []) do
|
|||
|
|
begin
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add(' update Order_HS set ChkFlag=0,ChkTime=getdate(),Chker=''' + Trim(DName) + ''',HZStatus=''<27><><EFBFBD>ύ''');
|
|||
|
|
sql.Add(' where HSID=''' + Trim(CDS_Main.fieldbyname('HSID').AsString) + ''' and isnull(HDFlag,0)<>1 ');
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.Delete;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
except
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>쳣!', '<27><>ʾ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.ChkerBtnClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
|||
|
|
with frmZDYHelp do
|
|||
|
|
begin
|
|||
|
|
flag := 'ChkOrd';
|
|||
|
|
flagname := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
Self.Chker.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmZDYHelp.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBTJClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if cxTabControl1.TabIndex <> 0 then
|
|||
|
|
Exit;
|
|||
|
|
if Trim(Chker.Text) = '' then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>˲<EFBFBD><CBB2><EFBFBD>Ϊ<EFBFBD><CEAA>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if CDS_Main.Locate('SSel', True, []) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
CDS_Main.DisableControls;
|
|||
|
|
with CDS_Main do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while CDS_Main.Locate('SSel', True, []) do
|
|||
|
|
begin
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add(' update Order_HS set TJFlag=1,TJTime=getdate(),TJperson=''' + Trim(DName) + ''',HZStatus=''<27><><EFBFBD>ύ'',TJChker=''' + Trim(Chker.Text) + '''');
|
|||
|
|
sql.Add(' where HSID=''' + Trim(CDS_Main.fieldbyname('HSID').AsString) + ''' ');
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.Delete;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
except
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>쳣!', '<27><>ʾ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBTJCXClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if cxTabControl1.TabIndex <> 1 then
|
|||
|
|
Exit;
|
|||
|
|
if CDS_Main.Locate('SSel', True, []) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
CDS_Main.DisableControls;
|
|||
|
|
with CDS_Main do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while CDS_Main.Locate('SSel', True, []) do
|
|||
|
|
begin
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add(' update Order_HS set TJFlag=0,TJTime=getdate(),TJperson=''' + Trim(DName) + ''',HZStatus=''<27><><EFBFBD>ύ'',TJChker=Null');
|
|||
|
|
sql.Add(' where HSID=''' + Trim(CDS_Main.fieldbyname('HSID').AsString) + ''' and isnull(ChkFlag,0)<>1');
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.Delete;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
except
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>쳣!', '<27><>ʾ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.FormClose(Sender: TObject; var Action: TCloseAction);
|
|||
|
|
begin
|
|||
|
|
Action := caFree;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBAddTSClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
try
|
|||
|
|
frmOrderHSInPutTS := TfrmOrderHSInPutTS.Create(Application);
|
|||
|
|
with frmOrderHSInPutTS do
|
|||
|
|
begin
|
|||
|
|
FCYID := '';
|
|||
|
|
GDFalg := 'N';
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
Self.InitGrid('');
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
finally
|
|||
|
|
frmOrderHSInPutTS.Free;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.Tv1Column42CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
|||
|
|
var
|
|||
|
|
FLiRunLv: double;
|
|||
|
|
begin
|
|||
|
|
if AViewInfo.GridRecord.Values[TcxGridDBTableView(Sender).GetColumnByFieldName('LiRunLv').Index] = null then
|
|||
|
|
Exit;
|
|||
|
|
FLiRunLv := AViewInfo.GridRecord.Values[TcxGridDBTableView(Sender).GetColumnByFieldName('LiRunLv').Index];
|
|||
|
|
if FLiRunLv < 0 then
|
|||
|
|
ACanvas.Brush.Color := clRed;
|
|||
|
|
if (FLiRunLv >= 0) and (FLiRunLv <= 5) then
|
|||
|
|
ACanvas.Brush.Color := clFuchsia;
|
|||
|
|
if (FLiRunLv > 5) and (FLiRunLv <= 10) then
|
|||
|
|
ACanvas.Brush.Color := clYellow;
|
|||
|
|
if FLiRunLv > 10 then
|
|||
|
|
ACanvas.Brush.Color := clLime;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.Panel5Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
InitGrid(TPanel(Sender).Hint);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.N1Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
SelOKNoFilterBand(Tv1, True);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.N2Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
SelOKNoFilterBand(Tv1, False);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.Button2Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
Panel10.Visible := False;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.Button1Click(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if Trim(BHNote.Text) = '' then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if cxTabControl2.TabIndex <> 0 then
|
|||
|
|
Exit;
|
|||
|
|
if CDS_Main.Locate('SSel', True, []) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
if Application.MessageBox('ȷ<><C8B7>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
|
|||
|
|
Exit;
|
|||
|
|
try
|
|||
|
|
ADOQueryCmd.Connection.BeginTrans;
|
|||
|
|
CDS_Main.DisableControls;
|
|||
|
|
with CDS_Main do
|
|||
|
|
begin
|
|||
|
|
First;
|
|||
|
|
while CDS_Main.Locate('SSel', True, []) do
|
|||
|
|
begin
|
|||
|
|
with ADOQueryCmd do
|
|||
|
|
begin
|
|||
|
|
Close;
|
|||
|
|
sql.Clear;
|
|||
|
|
sql.Add(' update Order_HS set TJFlag=0,TJTime=getdate(),TJperson=''' + Trim(DName) + ''',HZStatus=''<27><><EFBFBD><EFBFBD>'',TJChker=Null,BHNote=''' + Trim(BHNote.Text) + '''');
|
|||
|
|
sql.Add(' where HSID=''' + Trim(CDS_Main.fieldbyname('HSID').AsString) + ''' and isnull(ChkFlag,0)<>1');
|
|||
|
|
ExecSQL;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.Delete;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.CommitTrans;
|
|||
|
|
except
|
|||
|
|
CDS_Main.EnableControls;
|
|||
|
|
ADOQueryCmd.Connection.RollbackTrans;
|
|||
|
|
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>쳣!', '<27><>ʾ', 0);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.TBBHClick(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
if CDS_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
if cxTabControl2.TabIndex <> 0 then
|
|||
|
|
Exit;
|
|||
|
|
if CDS_Main.Locate('SSel', True, []) = False then
|
|||
|
|
begin
|
|||
|
|
Application.MessageBox('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!', '<27><>ʾ', 0);
|
|||
|
|
Exit;
|
|||
|
|
end;
|
|||
|
|
Panel10.Visible := True;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.ToolButton1Click(Sender: TObject);
|
|||
|
|
var
|
|||
|
|
str: string;
|
|||
|
|
begin
|
|||
|
|
if ADOQueryMain.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
str := SGetFilters(Panel1, 1, 2);
|
|||
|
|
str := str + 'ssel=true';
|
|||
|
|
SDofilter10(CDS_Main, str);
|
|||
|
|
|
|||
|
|
SelExportDatae(Tv1, CDS_Main, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>');
|
|||
|
|
// TcxGridToExcel('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', cxGrid1);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrmOrderHSList.SelExportDatae(FTv: TcxGridDBBandedTableView; cds_Main: TClientDataSet; FTile: string);
|
|||
|
|
var
|
|||
|
|
i, j: Integer;
|
|||
|
|
fsj: string;
|
|||
|
|
begin
|
|||
|
|
if cds_Main.IsEmpty then
|
|||
|
|
Exit;
|
|||
|
|
|
|||
|
|
try
|
|||
|
|
frmSelExportField := TfrmSelExportField.Create(Application);
|
|||
|
|
with frmSelExportField do
|
|||
|
|
begin
|
|||
|
|
with frmSelExportField.ExpGrid do
|
|||
|
|
begin
|
|||
|
|
// ExpGrid.Columns.Clear;
|
|||
|
|
ExpGrid.ClearItems;
|
|||
|
|
frmSelExportField.IniName := FTile;
|
|||
|
|
{if FTv.OptionsView.Footer=true then
|
|||
|
|
begin
|
|||
|
|
ExpGrid.OptionsView.Footer:=True;
|
|||
|
|
end else
|
|||
|
|
begin
|
|||
|
|
ExpGrid.OptionsView.Footer:=False;
|
|||
|
|
end; }
|
|||
|
|
ExpGrid.OptionsView.Footer := FTv.OptionsView.Footer;
|
|||
|
|
for i := 0 to FTv.ColumnCount - 1 do
|
|||
|
|
begin
|
|||
|
|
//if FTv.Columns[i].Visible=True then
|
|||
|
|
begin
|
|||
|
|
ExpGrid.CreateColumn;
|
|||
|
|
j := ExpGrid.ColumnCount - 1;
|
|||
|
|
ExpGrid.Columns[j].Caption := FTv.Columns[i].Caption;
|
|||
|
|
ExpGrid.Columns[i].Visible := FTv.Columns[i].Visible;
|
|||
|
|
ExpGrid.Columns[j].DataBinding.FieldName := FTv.Columns[i].DataBinding.FieldName;
|
|||
|
|
ExpGrid.Columns[j].Width := FTv.Columns[i].Width;
|
|||
|
|
ExpGrid.Columns[i].Summary.FooterKind := FTv.Columns[i].Summary.FooterKind;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
// TcxGridToExcel('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', cxGrid1);
|
|||
|
|
ExportDataSource.DataSet := cds_Main;
|
|||
|
|
cds_Main.Open;
|
|||
|
|
if ShowModal = 1 then
|
|||
|
|
begin
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
frmSelExportField.Free;
|
|||
|
|
except
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
InitGrid('');
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end.
|
|||
|
|
|