待检布加日志
This commit is contained in:
parent
05c7c64d72
commit
57b9ca0396
|
|
@ -245,6 +245,7 @@ begin
|
||||||
if Trim(FFSPID) = '' then
|
if Trim(FFSPID) = '' then
|
||||||
begin
|
begin
|
||||||
Append;
|
Append;
|
||||||
|
FieldByName('BZNoteList').Value := Trim(CDS_Sub.fieldbyname('FactoryName').AsString) + ';' + Trim(CDS_Sub.fieldbyname('OrderNo').AsString) + ';' + Trim(CDS_Sub.fieldbyname('PiQty').AsString);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
|
|
@ -437,13 +437,13 @@ object frmDJBCKOutList: TfrmDJBCKOutList
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 105
|
Top = 105
|
||||||
Width = 1193
|
Width = 1193
|
||||||
Height = 440
|
Height = 439
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
OnMouseDown = Tv1MouseDown
|
OnMouseDown = Tv1MouseDown
|
||||||
NavigatorButtons.ConfirmDelete = False
|
Navigator.Buttons.CustomButtons = <>
|
||||||
DataController.DataSource = DataSource1
|
DataController.DataSource = DataSource1
|
||||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
DataController.Summary.FooterSummaryItems = <
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,27 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses,
|
||||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls,
|
||||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
|
||||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset,
|
||||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
RM_System, RM_GridReport, Menus, cxCalendar, cxButtonEdit, cxTextEdit,
|
||||||
cxCalendar, cxButtonEdit, cxTextEdit, RM_BarCode;
|
RM_BarCode, cxLookAndFeels, cxLookAndFeelPainters, 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, cxNavigator;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmDJBCKOutList = class(TForm)
|
TfrmDJBCKOutList = class(TForm)
|
||||||
|
|
@ -133,15 +146,14 @@ type
|
||||||
procedure TBAddClick(Sender: TObject);
|
procedure TBAddClick(Sender: TObject);
|
||||||
procedure TBEditClick(Sender: TObject);
|
procedure TBEditClick(Sender: TObject);
|
||||||
procedure ToolButton3Click(Sender: TObject);
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton;
|
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
Shift: TShiftState; X, Y: Integer);
|
|
||||||
procedure PRTColorChange(Sender: TObject);
|
procedure PRTColorChange(Sender: TObject);
|
||||||
procedure SOrddefstr1Change(Sender: TObject);
|
procedure SOrddefstr1Change(Sender: TObject);
|
||||||
procedure PRTHXChange(Sender: TObject);
|
procedure PRTHXChange(Sender: TObject);
|
||||||
procedure QCorderNoKeyPress(Sender: TObject; var Key: Char);
|
procedure QCorderNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure CKorderNoKeyPress(Sender: TObject; var Key: Char);
|
procedure CKorderNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
private
|
private
|
||||||
canshu1,canshu2:string;
|
canshu1, canshu2: string;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
procedure GetGangLb();
|
procedure GetGangLb();
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
|
|
@ -153,8 +165,9 @@ var
|
||||||
frmDJBCKOutList: TfrmDJBCKOutList;
|
frmDJBCKOutList: TfrmDJBCKOutList;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink,U_RTFun,U_DJBCKOutPut;
|
U_DataLink, U_RTFun, U_DJBCKOutPut;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
procedure TfrmDJBCKOutList.GetGangLb();
|
procedure TfrmDJBCKOutList.GetGangLb();
|
||||||
|
|
@ -167,14 +180,14 @@ begin
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select * from KH_Zdy where Type=''LBGANGFLAG'' ');
|
sql.Add('select * from KH_Zdy where Type=''LBGANGFLAG'' ');
|
||||||
open;
|
open;
|
||||||
If not isEmpty then
|
if not isEmpty then
|
||||||
begin
|
begin
|
||||||
while not eof do
|
while not eof do
|
||||||
begin
|
begin
|
||||||
LBGANG.Items.Add(trim(fieldbyname('zdyName').AsString));
|
LBGANG.Items.Add(trim(fieldbyname('zdyName').AsString));
|
||||||
next;
|
next;
|
||||||
end;
|
end;
|
||||||
LBGANG.ItemIndex:=0;
|
LBGANG.ItemIndex := 0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
ADOQueryTemp.EnableControls;
|
ADOQueryTemp.EnableControls;
|
||||||
|
|
@ -182,22 +195,21 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.FormDestroy(Sender: TObject);
|
procedure TfrmDJBCKOutList.FormDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
frmDJBCKOutList:=nil;
|
frmDJBCKOutList := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.FormClose(Sender: TObject;
|
procedure TfrmDJBCKOutList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
var Action: TCloseAction);
|
|
||||||
begin
|
begin
|
||||||
Action:=caFree;
|
Action := caFree;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.FormCreate(Sender: TObject);
|
procedure TfrmDJBCKOutList.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
//cxGrid1.Align:=alClient;
|
//cxGrid1.Align:=alClient;
|
||||||
canshu1:=Trim(DParameters1);
|
canshu1 := Trim(DParameters1);
|
||||||
canshu2:=Trim(DParameters2);
|
canshu2 := Trim(DParameters2);
|
||||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||||
BegDate.DateTime:=EndDate.DateTime-1;
|
BegDate.DateTime := EndDate.DateTime - 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.InitGrid();
|
procedure TfrmDJBCKOutList.InitGrid();
|
||||||
|
|
@ -206,7 +218,7 @@ begin
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
Filtered:=False;
|
Filtered := False;
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' select A.* ,B.SOrddefstr1,B.PRTColor,B.PRTHX,B.PrtkuanNo');
|
sql.Add(' select A.* ,B.SOrddefstr1,B.PRTColor,B.PRTHX,B.PrtkuanNo');
|
||||||
|
|
@ -216,13 +228,13 @@ begin
|
||||||
SQL.Add(' and CRFlag=''出库'' ');
|
SQL.Add(' and CRFlag=''出库'' ');
|
||||||
SQL.Add(' and isnull(CKName,'''')=''待检布'' ');
|
SQL.Add(' and isnull(CKName,'''')=''待检布'' ');
|
||||||
|
|
||||||
Parameters.ParamByName('begdate').Value:=Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime));
|
Parameters.ParamByName('begdate').Value := Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime));
|
||||||
Parameters.ParamByName('enddate').Value:=Trim(FormatDateTime('yyyy-MM-dd',enddate.DateTime+1));
|
Parameters.ParamByName('enddate').Value := Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1));
|
||||||
Open;
|
Open;
|
||||||
//ShowMessage(SQL.Text);
|
//ShowMessage(SQL.Text);
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||||
finally
|
finally
|
||||||
ADOQueryMain.EnableControls;
|
ADOQueryMain.EnableControls;
|
||||||
end;
|
end;
|
||||||
|
|
@ -238,47 +250,49 @@ procedure TfrmDJBCKOutList.ConNoMChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.Active then
|
if ADOQueryMain.Active then
|
||||||
begin
|
begin
|
||||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.TBCloseClick(Sender: TObject);
|
procedure TfrmDJBCKOutList.TBCloseClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
WriteCxGrid('外加工出库列表PMD',Tv1,'外加工仓库');
|
WriteCxGrid('外加工出库列表PMD', Tv1, '外加工仓库');
|
||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.FormShow(Sender: TObject);
|
procedure TfrmDJBCKOutList.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if Trim(canshu2)='查看' then
|
if Trim(canshu2) = '查看' then
|
||||||
begin
|
begin
|
||||||
TBAdd.Visible:=False;
|
TBAdd.Visible := False;
|
||||||
TBDel.Visible:=False;
|
TBDel.Visible := False;
|
||||||
TBEdit.Visible:=False;
|
TBEdit.Visible := False;
|
||||||
end else
|
end
|
||||||
|
else
|
||||||
begin
|
begin
|
||||||
TBAdd.Visible:=True;
|
TBAdd.Visible := True;
|
||||||
TBDel.Visible:=True;
|
TBDel.Visible := True;
|
||||||
TBEdit.Visible:=True;
|
TBEdit.Visible := True;
|
||||||
end;
|
end;
|
||||||
GetGangLb();
|
GetGangLb();
|
||||||
ReadCxGrid('外加工出库列表PMD',Tv1,'外加工仓库');
|
ReadCxGrid('外加工出库列表PMD', Tv1, '外加工仓库');
|
||||||
//InitGrid();
|
//InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.TBExportClick(Sender: TObject);
|
procedure TfrmDJBCKOutList.TBExportClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.IsEmpty then exit;
|
if ADOQueryMain.IsEmpty then
|
||||||
TcxGridToExcel('外加工出库列表',cxGrid2);
|
exit;
|
||||||
|
TcxGridToExcel('外加工出库列表', cxGrid2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.TBFindClick(Sender: TObject);
|
procedure TfrmDJBCKOutList.TBFindClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.Active then
|
if ADOQueryMain.Active then
|
||||||
begin
|
begin
|
||||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -289,17 +303,17 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.SPIDChange(Sender: TObject);
|
procedure TfrmDJBCKOutList.SPIDChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if Length(Trim(SPID.Text))<4 then
|
if Length(Trim(SPID.Text)) < 4 then
|
||||||
begin
|
begin
|
||||||
if Trim(SPID.Text)<>'' then Exit;
|
if Trim(SPID.Text) <> '' then
|
||||||
|
Exit;
|
||||||
end;
|
end;
|
||||||
TBFind.Click;
|
TBFind.Click;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.SPIDKeyPress(Sender: TObject;
|
procedure TfrmDJBCKOutList.SPIDKeyPress(Sender: TObject; var Key: Char);
|
||||||
var Key: Char);
|
|
||||||
begin
|
begin
|
||||||
if Key=#13 then
|
if Key = #13 then
|
||||||
begin
|
begin
|
||||||
{if Length(Trim(SPID.Text))<4 then Exit;
|
{if Length(Trim(SPID.Text))<4 then Exit;
|
||||||
try
|
try
|
||||||
|
|
@ -326,17 +340,18 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.N1Click(Sender: TObject);
|
procedure TfrmDJBCKOutList.N1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CDS_Main.IsEmpty then Exit;
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
CDS_Main.DisableControls;
|
CDS_Main.DisableControls;
|
||||||
with CDS_Main do
|
with CDS_Main do
|
||||||
begin
|
begin
|
||||||
First;
|
First;
|
||||||
while not eof do
|
while not eof do
|
||||||
begin
|
begin
|
||||||
if Trim(CDS_Main.fieldbyname('CRType').AsString)='检验出库' then
|
if Trim(CDS_Main.fieldbyname('CRType').AsString) = '检验出库' then
|
||||||
begin
|
begin
|
||||||
Edit;
|
Edit;
|
||||||
FieldByName('SSel').Value:=True;
|
FieldByName('SSel').Value := True;
|
||||||
Post;
|
Post;
|
||||||
end;
|
end;
|
||||||
Next;
|
Next;
|
||||||
|
|
@ -347,66 +362,76 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.N2Click(Sender: TObject);
|
procedure TfrmDJBCKOutList.N2Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
SelOKNo(CDS_Main,False);
|
SelOKNo(CDS_Main, False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.TBDelClick(Sender: TObject);
|
procedure TfrmDJBCKOutList.TBDelClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CDS_Main.IsEmpty then Exit;
|
if CDS_Main.IsEmpty then
|
||||||
if Trim(CDS_Main.fieldbyname('SPID').AsString)<>'' then
|
Exit;
|
||||||
|
if Trim(CDS_Main.fieldbyname('SPID').AsString) <> '' then
|
||||||
begin
|
begin
|
||||||
with ADOQueryTemp do
|
with ADOQueryTemp do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select Top 1 * from WFB_MJJY where isnull(APID,'''')='''+Trim(CDS_Main.fieldbyname('SPID').AsString)+'''');
|
sql.Add('select Top 1 * from WFB_MJJY where isnull(APID,'''')=''' + Trim(CDS_Main.fieldbyname('SPID').AsString) + '''');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
if ADOQueryTemp.IsEmpty=False then
|
if ADOQueryTemp.IsEmpty = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('已检验不能删除数据!','提示',0);
|
Application.MessageBox('已检验不能删除数据!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
if Trim(CDS_Main.fieldbyname('CRType').AsString)='平移出库' then
|
if Trim(CDS_Main.fieldbyname('CRType').AsString) = '平移出库' then
|
||||||
begin
|
begin
|
||||||
with ADOQueryTemp do
|
with ADOQueryTemp do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select * from CK_SXPB_CR where FZSPID=');
|
sql.Add('select * from CK_SXPB_CR where FZSPID=');
|
||||||
sql.Add('(select SPID from CK_SXPB_CR where PYID='''+Trim(CDS_Main.fieldbyname('SPID').AsString)+'''');
|
sql.Add('(select SPID from CK_SXPB_CR where PYID=''' + Trim(CDS_Main.fieldbyname('SPID').AsString) + '''');
|
||||||
sql.Add(' and isnull(CRType,'''')=''平移入库'')');
|
sql.Add(' and isnull(CRType,'''')=''平移入库'')');
|
||||||
sql.Add(' and CRQtyFlag=-1');
|
sql.Add(' and CRQtyFlag=-1');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
if ADOQueryTemp.IsEmpty=False then
|
if ADOQueryTemp.IsEmpty = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('已有出库记录,不能删除!','提示',0);
|
Application.MessageBox('已有出库记录,不能删除!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
try
|
try
|
||||||
ADOQueryCmd.Connection.BeginTrans;
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' delete CK_SXPB_CR where SPID='''+Trim(CDS_Main.fieldbyname('SPID').AsString)+'''');
|
sql.Add(' delete CK_SXPB_CR where SPID=''' + Trim(CDS_Main.fieldbyname('SPID').AsString) + '''');
|
||||||
sql.Add(' Update CK_SXPB_CR Set MXKCQty=(select sum(isnull(Qty,0)*CRQtyFlag) from CK_SXPB_CR A where A.FZSPID=CK_SXPB_CR.SPID)');
|
sql.Add(' Update CK_SXPB_CR Set MXKCQty=(select sum(isnull(Qty,0)*CRQtyFlag) from CK_SXPB_CR A where A.FZSPID=CK_SXPB_CR.SPID)');
|
||||||
sql.Add(',MXKCPiQty=(select sum(isnull(PiQty,0)*CRQtyFlag) from CK_SXPB_CR A where A.FZSPID=CK_SXPB_CR.SPID)');
|
sql.Add(',MXKCPiQty=(select sum(isnull(PiQty,0)*CRQtyFlag) from CK_SXPB_CR A where A.FZSPID=CK_SXPB_CR.SPID)');
|
||||||
sql.Add(' where SPID='''+Trim(CDS_Main.fieldbyname('FZSPID').AsString)+'''');
|
sql.Add(' where SPID=''' + Trim(CDS_Main.fieldbyname('FZSPID').AsString) + '''');
|
||||||
if Trim(CDS_Main.fieldbyname('CRType').AsString)='平移出库' then
|
if Trim(CDS_Main.fieldbyname('CRType').AsString) = '平移出库' then
|
||||||
begin
|
begin
|
||||||
sql.Add(' delete CK_SXPB_CR where isnull(PYID,'''')='''+Trim(CDS_Main.fieldbyname('PYID').AsString)+'''');
|
sql.Add(' delete CK_SXPB_CR where isnull(PYID,'''')=''' + Trim(CDS_Main.fieldbyname('PYID').AsString) + '''');
|
||||||
end;
|
end;
|
||||||
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' ' + quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim('待检布出库删除')));
|
||||||
|
sql.Add(',' + quotedstr(trim('出库单号:' + trim(CDS_Main.FieldByName('SPID').AsString) + ',加工厂' + trim(CDS_Main.FieldByName('factoryName').AsString) + ',订单号' + trim(CDS_Main.FieldByName('QCorderNo').AsString) + ',匹数' + trim(CDS_Main.FieldByName('piqty').AsString))));
|
||||||
|
sql.Add(',' + quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
ExecSQL;
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
ADOQueryCmd.Connection.CommitTrans;
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
except
|
except
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
Application.MessageBox('删除异常!','提示',0);
|
Application.MessageBox('删除异常!', '提示', 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
CDS_Main.Delete;
|
CDS_Main.Delete;
|
||||||
|
|
@ -415,11 +440,11 @@ end;
|
||||||
procedure TfrmDJBCKOutList.TBAddClick(Sender: TObject);
|
procedure TfrmDJBCKOutList.TBAddClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
frmDJBCKOutPut:=TfrmDJBCKOutPut.Create(Application);
|
frmDJBCKOutPut := TfrmDJBCKOutPut.Create(Application);
|
||||||
with frmDJBCKOutPut do
|
with frmDJBCKOutPut do
|
||||||
begin
|
begin
|
||||||
FBCId:='';
|
FBCId := '';
|
||||||
if ShowModal=1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
Self.InitGrid();
|
Self.InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
@ -431,30 +456,31 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.TBEditClick(Sender: TObject);
|
procedure TfrmDJBCKOutList.TBEditClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CDS_Main.IsEmpty then Exit;
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
with ADOQueryTemp do
|
with ADOQueryTemp do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select * from CK_SXPB_CR where FZSPID=');
|
sql.Add('select * from CK_SXPB_CR where FZSPID=');
|
||||||
sql.Add('(select SPID from CK_SXPB_CR where PYID='''+Trim(CDS_Main.fieldbyname('SPID').AsString)+'''');
|
sql.Add('(select SPID from CK_SXPB_CR where PYID=''' + Trim(CDS_Main.fieldbyname('SPID').AsString) + '''');
|
||||||
sql.Add(' and isnull(CRType,'''')=''平移入库'')');
|
sql.Add(' and isnull(CRType,'''')=''平移入库'')');
|
||||||
sql.Add(' and CRQtyFlag=-1');
|
sql.Add(' and CRQtyFlag=-1');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
if ADOQueryTemp.IsEmpty=False then
|
if ADOQueryTemp.IsEmpty = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('已有出库记录,不能修改!','提示',0);
|
Application.MessageBox('已有出库记录,不能修改!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
try
|
try
|
||||||
frmDJBCKOutPut:=TfrmDJBCKOutPut.Create(Application);
|
frmDJBCKOutPut := TfrmDJBCKOutPut.Create(Application);
|
||||||
with frmDJBCKOutPut do
|
with frmDJBCKOutPut do
|
||||||
begin
|
begin
|
||||||
FBCId:=Trim(CDS_Main.fieldbyname('SPID').AsString);
|
FBCId := Trim(CDS_Main.fieldbyname('SPID').AsString);
|
||||||
TBDel.Visible:=False;
|
TBDel.Visible := False;
|
||||||
TBAdd.Visible:=False;
|
TBAdd.Visible := False;
|
||||||
if ShowModal=1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
Self.InitGrid();
|
Self.InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
@ -467,31 +493,31 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.ToolButton3Click(Sender: TObject);
|
procedure TfrmDJBCKOutList.ToolButton3Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
fPrintFile:string;
|
fPrintFile: string;
|
||||||
Txt,fImagePath:string;
|
Txt, fImagePath: string;
|
||||||
Moudle: THandle;
|
Moudle: THandle;
|
||||||
Makebar:TMakebar;
|
Makebar: TMakebar;
|
||||||
Mixtext:TMixtext;
|
Mixtext: TMixtext;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if CDS_Main.IsEmpty then Exit;
|
if CDS_Main.IsEmpty then
|
||||||
|
Exit;
|
||||||
//if Trim(CDS_Main.fieldbyname('CRType').AsString)<>'检验出库' then Exit;
|
//if Trim(CDS_Main.fieldbyname('CRType').AsString)<>'检验出库' then Exit;
|
||||||
if CDS_Main.Locate('SSel',True,[])=False then
|
if CDS_Main.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!','提示',0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
IF Trim(LBGANG.Text)='' then
|
if Trim(LBGANG.Text) = '' then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('选择要打印的缸标签!','提示',0);
|
Application.MessageBox('选择要打印的缸标签!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\'+Trim(LBGANG.Text)+'.rmf' ;
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(LBGANG.Text) + '.rmf';
|
||||||
CDS_Main.DisableControls;
|
CDS_Main.DisableControls;
|
||||||
with CDS_Main do
|
with CDS_Main do
|
||||||
begin
|
begin
|
||||||
First;
|
First;
|
||||||
while CDS_Main.Locate('SSel',True,[]) do
|
while CDS_Main.Locate('SSel', True, []) do
|
||||||
begin
|
begin
|
||||||
with ADOQueryPrint do
|
with ADOQueryPrint do
|
||||||
begin
|
begin
|
||||||
|
|
@ -503,41 +529,43 @@ begin
|
||||||
sql.Add(' from CK_SXPB_CR A');
|
sql.Add(' from CK_SXPB_CR A');
|
||||||
sql.Add(' left join JYOrder_Main B on A.ORDmainIdCK=B.mainID');
|
sql.Add(' left join JYOrder_Main B on A.ORDmainIdCK=B.mainID');
|
||||||
sql.Add(' left join JYOrder_Sub C on A.ORDSubIdCK=C.subID');
|
sql.Add(' left join JYOrder_Sub C on A.ORDSubIdCK=C.subID');
|
||||||
sql.Add(' where A.SPId='''+Trim(CDS_Main.fieldbyname('SPId').AsString)+'''');
|
sql.Add(' where A.SPId=''' + Trim(CDS_Main.fieldbyname('SPId').AsString) + '''');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryPrint,CDS_PRT);
|
SCreateCDS20(ADOQueryPrint, CDS_PRT);
|
||||||
SInitCDSData20(ADOQueryPrint,CDS_PRT);
|
SInitCDSData20(ADOQueryPrint, CDS_PRT);
|
||||||
try
|
try
|
||||||
Moudle:=LoadLibrary('MakeQRBarcode.dll');
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
@Makebar:=GetProcAddress(Moudle,'Make');
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
@Mixtext:=GetProcAddress(Moudle,'MixText');
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
Txt:=Trim(CDS_PRT.fieldbyname('SPID').AsString);
|
Txt := Trim(CDS_PRT.fieldbyname('SPID').AsString);
|
||||||
fImagePath:=ExtractFilePath(Application.ExeName)+'image\temp.bmp' ;
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName)+'image')) then
|
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName)+'image'),nil);
|
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
if FileExists(fImagePath) then DeleteFile(fImagePath);
|
if FileExists(fImagePath) then
|
||||||
Makebar(pchar(Txt),Length(Txt),3,3,0,PChar(fImagePath),3);
|
DeleteFile(fImagePath);
|
||||||
|
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
except
|
except
|
||||||
CDS_Main.EnableControls;
|
CDS_Main.EnableControls;
|
||||||
application.MessageBox('条形码生成失败!','提示信息',MB_ICONERROR);
|
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if FileExists(fPrintFile) then
|
if FileExists(fPrintFile) then
|
||||||
begin
|
begin
|
||||||
RMVariables['QRBARCODE']:=fImagePath;
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
RM1.LoadFromFile(fPrintFile);
|
RM1.LoadFromFile(fPrintFile);
|
||||||
//RM1.ShowReport;
|
//RM1.ShowReport;
|
||||||
RM1.PrintReport;
|
RM1.PrintReport;
|
||||||
end else
|
end
|
||||||
|
else
|
||||||
begin
|
begin
|
||||||
CDS_Main.EnableControls;
|
CDS_Main.EnableControls;
|
||||||
Application.MessageBox(PChar('没有找'+fPrintFile),'提示',0);
|
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
Edit;
|
Edit;
|
||||||
FieldByName('SSel').Value:=False;
|
FieldByName('SSel').Value := False;
|
||||||
Post;
|
Post;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
@ -545,8 +573,7 @@ begin
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.Tv1MouseDown(Sender: TObject;
|
procedure TfrmDJBCKOutList.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
|
||||||
begin
|
begin
|
||||||
{ if CDS_Main.IsEmpty then Exit;
|
{ if CDS_Main.IsEmpty then Exit;
|
||||||
if Trim(CDS_Main.fieldbyname('CRType').AsString)<>'检验出库' then
|
if Trim(CDS_Main.fieldbyname('CRType').AsString)<>'检验出库' then
|
||||||
|
|
@ -573,60 +600,60 @@ begin
|
||||||
TBFind.Click;
|
TBFind.Click;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.QCorderNoKeyPress(Sender: TObject;
|
procedure TfrmDJBCKOutList.QCorderNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
var Key: Char);
|
|
||||||
begin
|
begin
|
||||||
IF trim(QCorderNo.Text)='' then exit;
|
if trim(QCorderNo.Text) = '' then
|
||||||
IF Key=#13 then
|
exit;
|
||||||
|
if Key = #13 then
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
Filtered:=False;
|
Filtered := False;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' select A.* ,B.SOrddefstr1,B.PRTColor,B.PRTHX,B.PrtkuanNo');
|
sql.Add(' select A.* ,B.SOrddefstr1,B.PRTColor,B.PRTHX,B.PrtkuanNo');
|
||||||
sql.Add(' from CK_SXPB_CR A');
|
sql.Add(' from CK_SXPB_CR A');
|
||||||
sql.Add(' left join JYOrder_Sub B on A.ORDSubIdCK=B.SubId');
|
sql.Add(' left join JYOrder_Sub B on A.ORDSubIdCK=B.SubId');
|
||||||
sql.add(' where A.QCorderNo like '+quotedstr('%'+trim(QCorderNo.text)+'%'));
|
sql.add(' where A.QCorderNo like ' + quotedstr('%' + trim(QCorderNo.text) + '%'));
|
||||||
SQL.Add(' and CRFlag=''出库'' ');
|
SQL.Add(' and CRFlag=''出库'' ');
|
||||||
SQL.Add(' and isnull(CKName,'''')=''待检布'' ');
|
SQL.Add(' and isnull(CKName,'''')=''待检布'' ');
|
||||||
Open;
|
Open;
|
||||||
//ShowMessage(SQL.Text);
|
//ShowMessage(SQL.Text);
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||||
finally
|
finally
|
||||||
ADOQueryMain.EnableControls;
|
ADOQueryMain.EnableControls;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBCKOutList.CKorderNoKeyPress(Sender: TObject;
|
procedure TfrmDJBCKOutList.CKorderNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
var Key: Char);
|
|
||||||
begin
|
begin
|
||||||
IF trim(CKorderNo.Text)='' then exit;
|
if trim(CKorderNo.Text) = '' then
|
||||||
IF Key=#13 then
|
exit;
|
||||||
|
if Key = #13 then
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
Filtered:=False;
|
Filtered := False;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' select A.* ,B.SOrddefstr1,B.PRTColor,B.PRTHX,B.PrtkuanNo');
|
sql.Add(' select A.* ,B.SOrddefstr1,B.PRTColor,B.PRTHX,B.PrtkuanNo');
|
||||||
sql.Add(' from CK_SXPB_CR A');
|
sql.Add(' from CK_SXPB_CR A');
|
||||||
sql.Add(' left join JYOrder_Sub B on A.ORDSubIdCK=B.SubId');
|
sql.Add(' left join JYOrder_Sub B on A.ORDSubIdCK=B.SubId');
|
||||||
sql.add(' where A.CKorderNo like '+quotedstr('%'+trim(CKorderNo.text)+'%'));
|
sql.add(' where A.CKorderNo like ' + quotedstr('%' + trim(CKorderNo.text) + '%'));
|
||||||
SQL.Add(' and CRFlag=''出库'' ');
|
SQL.Add(' and CRFlag=''出库'' ');
|
||||||
SQL.Add(' and isnull(CKName,'''')=''待检布'' ');
|
SQL.Add(' and isnull(CKName,'''')=''待检布'' ');
|
||||||
Open;
|
Open;
|
||||||
//ShowMessage(SQL.Text);
|
//ShowMessage(SQL.Text);
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||||
finally
|
finally
|
||||||
ADOQueryMain.EnableControls;
|
ADOQueryMain.EnableControls;
|
||||||
end;
|
end;
|
||||||
|
|
@ -634,3 +661,4 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,29 +4,27 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
|
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
|
||||||
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
|
cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
|
||||||
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
|
cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses,
|
||||||
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
|
cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls,
|
||||||
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
|
ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
|
||||||
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, cxCheckBox, RM_Common,
|
cxDropDownEdit, cxCheckBox, RM_Common, RM_Class, RM_e_Xls, RM_Dataset,
|
||||||
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
|
RM_System, RM_GridReport, Menus, cxCalendar, cxButtonEdit, cxTextEdit, cxPC,
|
||||||
cxCalendar, cxButtonEdit, cxTextEdit, cxPC, BtnEdit, cxLookAndFeels,
|
BtnEdit, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinBlack,
|
||||||
cxLookAndFeelPainters, dxSkinsCore, dxSkinBlack, dxSkinBlue,
|
dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
|
||||||
dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom,
|
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
|
||||||
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle,
|
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
|
||||||
dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary,
|
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
|
||||||
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin,
|
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
|
||||||
dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
|
||||||
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
|
||||||
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
|
||||||
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
||||||
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin,
|
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||||
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||||
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||||
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
dxSkinscxPCPainter, cxNavigator, dxBarBuiltInMenu;
|
||||||
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter,
|
|
||||||
cxNavigator, dxBarBuiltInMenu;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmDJBRKList = class(TForm)
|
TfrmDJBRKList = class(TForm)
|
||||||
|
|
@ -172,9 +170,9 @@ type
|
||||||
procedure Button2Click(Sender: TObject);
|
procedure Button2Click(Sender: TObject);
|
||||||
procedure defstr2KeyPress(Sender: TObject; var Key: Char);
|
procedure defstr2KeyPress(Sender: TObject; var Key: Char);
|
||||||
private
|
private
|
||||||
canshu1,canshu2:string;
|
canshu1, canshu2: string;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
Procedure setstatus();
|
procedure setstatus();
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
public
|
public
|
||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
|
|
@ -184,33 +182,34 @@ var
|
||||||
frmDJBRKList: TfrmDJBRKList;
|
frmDJBRKList: TfrmDJBRKList;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink,U_RTFun,U_DJBCKInPut, U_ZdyAttachGYS;
|
U_DataLink, U_RTFun, U_DJBCKInPut, U_ZdyAttachGYS;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
Procedure TfrmDJBRKList.setstatus();
|
procedure TfrmDJBRKList.setstatus();
|
||||||
begin
|
begin
|
||||||
TBedit.Visible:=false;
|
TBedit.Visible := false;
|
||||||
TBdel.Visible:=false;
|
TBdel.Visible := false;
|
||||||
TBchk.Visible:=false;
|
TBchk.Visible := false;
|
||||||
TBNochk.Visible:=false;
|
TBNochk.Visible := false;
|
||||||
TBTSedit.Visible:=false;
|
TBTSedit.Visible := false;
|
||||||
IF canshu1='高权限'then
|
if canshu1 = '高权限' then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
case cxTabControl1.TabIndex of
|
case cxTabControl1.TabIndex of
|
||||||
0:
|
0:
|
||||||
begin
|
begin
|
||||||
TBedit.Visible:=true;
|
TBedit.Visible := true;
|
||||||
TBdel.Visible:=true;
|
TBdel.Visible := true;
|
||||||
TBchk.Visible:=true;
|
TBchk.Visible := true;
|
||||||
TBTSedit.Visible:=true;
|
TBTSedit.Visible := true;
|
||||||
end;
|
end;
|
||||||
1:
|
1:
|
||||||
begin
|
begin
|
||||||
TBNochk.Visible:=True;
|
TBNochk.Visible := True;
|
||||||
TBTSedit.Visible:=true;
|
TBTSedit.Visible := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
|
@ -218,15 +217,15 @@ begin
|
||||||
begin
|
begin
|
||||||
case cxTabControl1.TabIndex of
|
case cxTabControl1.TabIndex of
|
||||||
0:
|
0:
|
||||||
begin
|
begin
|
||||||
TBedit.Visible:=true;
|
TBedit.Visible := true;
|
||||||
TBdel.Visible:=true;
|
TBdel.Visible := true;
|
||||||
// TBchk.Visible:=true;
|
// TBchk.Visible:=true;
|
||||||
end;
|
end;
|
||||||
1:
|
1:
|
||||||
begin
|
begin
|
||||||
// TBNochk.Visible:=True;
|
// TBNochk.Visible:=True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
@ -234,22 +233,21 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.FormDestroy(Sender: TObject);
|
procedure TfrmDJBRKList.FormDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
frmDJBRKList:=nil;
|
frmDJBRKList := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.FormClose(Sender: TObject;
|
procedure TfrmDJBRKList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
var Action: TCloseAction);
|
|
||||||
begin
|
begin
|
||||||
Action:=caFree;
|
Action := caFree;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.FormCreate(Sender: TObject);
|
procedure TfrmDJBRKList.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
//cxGrid1.Align:=alClient;
|
//cxGrid1.Align:=alClient;
|
||||||
canshu1:=Trim(DParameters1);
|
canshu1 := Trim(DParameters1);
|
||||||
canshu2:=Trim(DParameters2);
|
canshu2 := Trim(DParameters2);
|
||||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||||
BegDate.DateTime:=EndDate.DateTime;
|
BegDate.DateTime := EndDate.DateTime;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.InitGrid();
|
procedure TfrmDJBRKList.InitGrid();
|
||||||
|
|
@ -258,7 +256,7 @@ begin
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
Filtered:=False;
|
Filtered := False;
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' select A.* ,AvgQty=case when piQty<>0 then cast(Qty/piQty as decimal(18,2)) else 0 end');
|
sql.Add(' select A.* ,AvgQty=case when piQty<>0 then cast(Qty/piQty as decimal(18,2)) else 0 end');
|
||||||
|
|
@ -268,17 +266,17 @@ begin
|
||||||
sql.Add(' ,PRTkuanNo=(select PRTkuanNo from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
sql.Add(' ,PRTkuanNo=(select PRTkuanNo from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
||||||
sql.Add(' ,PRTHX=(select PRTHX from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
sql.Add(' ,PRTHX=(select PRTHX from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
||||||
sql.Add(' from CK_SXPB_CR A');
|
sql.Add(' from CK_SXPB_CR A');
|
||||||
sql.add(' where A.CRTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+'''');
|
sql.add(' where A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''');
|
||||||
sql.Add(' and A.CRTime<='''+Trim(FormatDateTime('yyyy-MM-dd',enddate.DateTime+1))+'''');
|
sql.Add(' and A.CRTime<=''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + '''');
|
||||||
sql.Add(' and isnull(CKName,'''')=''´ý¼ì²¼''');
|
sql.Add(' and isnull(CKName,'''')=''´ý¼ì²¼''');
|
||||||
SQL.Add(' and CRFlag=''Èë¿â'' ');
|
SQL.Add(' and CRFlag=''Èë¿â'' ');
|
||||||
IF cxTabControl1.TabIndex<2 then
|
if cxTabControl1.TabIndex < 2 then
|
||||||
SQL.Add(' and isnull(A.chkstatus,''0'')='''+inttostr(cxTabControl1.TabIndex)+''' ');
|
SQL.Add(' and isnull(A.chkstatus,''0'')=''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
||||||
Open;
|
Open;
|
||||||
//ShowMessage(SQL.Text);
|
//ShowMessage(SQL.Text);
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||||
finally
|
finally
|
||||||
ADOQueryMain.EnableControls;
|
ADOQueryMain.EnableControls;
|
||||||
end;
|
end;
|
||||||
|
|
@ -294,84 +292,88 @@ procedure TfrmDJBRKList.ConNoMChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.Active then
|
if ADOQueryMain.Active then
|
||||||
begin
|
begin
|
||||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.TBCloseClick(Sender: TObject);
|
procedure TfrmDJBRKList.TBCloseClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
WriteCxGrid('待检布入库列表',Tv1,'待检布仓库');
|
WriteCxGrid('待检布入库列表', Tv1, '待检布仓库');
|
||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.FormShow(Sender: TObject);
|
procedure TfrmDJBRKList.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if Trim(canshu2)='查看' then
|
if Trim(canshu2) = '查看' then
|
||||||
begin
|
begin
|
||||||
TBAdd.Visible:=False;
|
TBAdd.Visible := False;
|
||||||
TBDel.Visible:=False;
|
TBDel.Visible := False;
|
||||||
TBEdit.Visible:=False;
|
TBEdit.Visible := False;
|
||||||
end else
|
end
|
||||||
|
else
|
||||||
begin
|
begin
|
||||||
TBAdd.Visible:=True;
|
TBAdd.Visible := True;
|
||||||
TBDel.Visible:=True;
|
TBDel.Visible := True;
|
||||||
TBEdit.Visible:=True;
|
TBEdit.Visible := True;
|
||||||
end;
|
end;
|
||||||
ReadCxGrid('待检布入库列表',Tv1,'待检布仓库');
|
ReadCxGrid('待检布入库列表', Tv1, '待检布仓库');
|
||||||
setstatus();
|
setstatus();
|
||||||
// InitGrid();
|
// InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.TBExportClick(Sender: TObject);
|
procedure TfrmDJBRKList.TBExportClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.IsEmpty then exit;
|
if ADOQueryMain.IsEmpty then
|
||||||
TcxGridToExcel('待检布入库列表',cxGrid2);
|
exit;
|
||||||
|
TcxGridToExcel('待检布入库列表', cxGrid2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.TBFindClick(Sender: TObject);
|
procedure TfrmDJBRKList.TBFindClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.Active then
|
if ADOQueryMain.Active then
|
||||||
begin
|
begin
|
||||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.N1Click(Sender: TObject);
|
procedure TfrmDJBRKList.N1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
SelOKNo(CDS_Main,True);
|
SelOKNo(CDS_Main, True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.N2Click(Sender: TObject);
|
procedure TfrmDJBRKList.N2Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
SelOKNo(CDS_Main,False);
|
SelOKNo(CDS_Main, False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.TBDelClick(Sender: TObject);
|
procedure TfrmDJBRKList.TBDelClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CDS_Main.IsEmpty then Exit;
|
if CDS_Main.IsEmpty then
|
||||||
if Trim(CDS_Main.fieldbyname('SPID').AsString)<>'' then
|
Exit;
|
||||||
|
if Trim(CDS_Main.fieldbyname('SPID').AsString) <> '' then
|
||||||
begin
|
begin
|
||||||
if Trim(CDS_Main.fieldbyname('CRType').AsString)='平移入库' then
|
if Trim(CDS_Main.fieldbyname('CRType').AsString) = '平移入库' then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('平移入库的数据为自动生成,不能删除!','提示',0);
|
Application.MessageBox('平移入库的数据为自动生成,不能删除!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
with ADOQueryTemp do
|
with ADOQueryTemp do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select * from CK_SXPB_CR where FZSPID='''+Trim(CDS_Main.fieldbyname('SPID').AsString)+'''');
|
sql.Add('select * from CK_SXPB_CR where FZSPID=''' + Trim(CDS_Main.fieldbyname('SPID').AsString) + '''');
|
||||||
sql.Add(' and CRQtyFlag=-1');
|
sql.Add(' and CRQtyFlag=-1');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
if ADOQueryTemp.IsEmpty=False then
|
if ADOQueryTemp.IsEmpty = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('已有出库记录,不能删除!','提示',0);
|
Application.MessageBox('已有出库记录,不能删除!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
try
|
try
|
||||||
ADOQueryCmd.Connection.BeginTrans;
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
|
||||||
|
|
@ -379,10 +381,18 @@ begin
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' delete CK_SXPB_CR where SPID='''+Trim(CDS_Main.fieldbyname('SPID').AsString)+'''');
|
sql.Add(' delete CK_SXPB_CR where SPID=''' + Trim(CDS_Main.fieldbyname('SPID').AsString) + '''');
|
||||||
{sql.Add('Update CK_SXPB_KC Set KCKGQty=(select sum(isnull(KGQty,0)*CRQtyFlag) from CK_SXPB_CR A where A.CRID=CK_SXPB_KC.CRID)');
|
{sql.Add('Update CK_SXPB_KC Set KCKGQty=(select sum(isnull(KGQty,0)*CRQtyFlag) from CK_SXPB_CR A where A.CRID=CK_SXPB_KC.CRID)');
|
||||||
sql.Add(',KCPiQty=(select sum(isnull(PiQty,0)*CRQtyFlag) from CK_SXPB_CR A where A.CRID=CK_SXPB_KC.CRID)');
|
sql.Add(',KCPiQty=(select sum(isnull(PiQty,0)*CRQtyFlag) from CK_SXPB_CR A where A.CRID=CK_SXPB_KC.CRID)');
|
||||||
sql.Add(' where CRID='+Trim(CDS_Main.fieldbyname('CRID').AsString));}
|
sql.Add(' where CRID='+Trim(CDS_Main.fieldbyname('CRID').AsString));}
|
||||||
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' ' + quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim('待检布入库删除')));
|
||||||
|
sql.Add(',' + quotedstr(trim('入库单号:' + trim(CDS_Main.FieldByName('SPID').AsString) + ',加工厂' + trim(CDS_Main.FieldByName('factoryName').AsString) + ',订单号' + trim(CDS_Main.FieldByName('QCorderNo').AsString) + ',匹数' + trim(CDS_Main.FieldByName('piqty').AsString))));
|
||||||
|
sql.Add(',' + quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
ExecSQL;
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
{ with ADOQueryTemp do
|
{ with ADOQueryTemp do
|
||||||
|
|
@ -406,10 +416,11 @@ begin
|
||||||
CDS_Main.Delete;
|
CDS_Main.Delete;
|
||||||
except
|
except
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
Application.MessageBox('删除异常!','提示',0);
|
Application.MessageBox('删除异常!', '提示', 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end else
|
end
|
||||||
|
else
|
||||||
begin
|
begin
|
||||||
CDS_Main.Delete;
|
CDS_Main.Delete;
|
||||||
end;
|
end;
|
||||||
|
|
@ -418,11 +429,11 @@ end;
|
||||||
procedure TfrmDJBRKList.TBAddClick(Sender: TObject);
|
procedure TfrmDJBRKList.TBAddClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
frmDJBCKInPut:=TfrmDJBCKInPut.Create(Application);
|
frmDJBCKInPut := TfrmDJBCKInPut.Create(Application);
|
||||||
with frmDJBCKInPut do
|
with frmDJBCKInPut do
|
||||||
begin
|
begin
|
||||||
FBCId:='';
|
FBCId := '';
|
||||||
if ShowModal=1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
Self.InitGrid();
|
Self.InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
@ -434,20 +445,34 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.TBEditClick(Sender: TObject);
|
procedure TfrmDJBRKList.TBEditClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CDS_Main.IsEmpty then Exit;
|
if CDS_Main.IsEmpty then
|
||||||
if Trim(CDS_Main.fieldbyname('CRType').AsString)='平移入库' then
|
Exit;
|
||||||
|
if Trim(CDS_Main.fieldbyname('CRType').AsString) = '平移入库' then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('平移入库的数据为自动生成,不能修改!','提示',0);
|
Application.MessageBox('平移入库的数据为自动生成,不能修改!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from CK_SXPB_CR where FZSPID=''' + Trim(CDS_Main.fieldbyname('SPID').AsString) + '''');
|
||||||
|
sql.Add(' and CRQtyFlag=-1');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
if ADOQueryTemp.IsEmpty = False then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('已有出库记录,不能修改!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
try
|
try
|
||||||
frmDJBCKInPut:=TfrmDJBCKInPut.Create(Application);
|
frmDJBCKInPut := TfrmDJBCKInPut.Create(Application);
|
||||||
with frmDJBCKInPut do
|
with frmDJBCKInPut do
|
||||||
begin
|
begin
|
||||||
FBCId:=Trim(CDS_Main.fieldbyname('SPID').AsString);
|
FBCId := Trim(CDS_Main.fieldbyname('SPID').AsString);
|
||||||
TBDel.Visible:=False;
|
TBDel.Visible := False;
|
||||||
TBAdd.Visible:=False;
|
TBAdd.Visible := False;
|
||||||
if ShowModal=1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
Self.InitGrid();
|
Self.InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
@ -459,7 +484,7 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.SPIDKeyPress(Sender: TObject; var Key: Char);
|
procedure TfrmDJBRKList.SPIDKeyPress(Sender: TObject; var Key: Char);
|
||||||
begin
|
begin
|
||||||
if Key=#13 then
|
if Key = #13 then
|
||||||
begin
|
begin
|
||||||
{if Length(Trim(SPID.Text))<4 then Exit;
|
{if Length(Trim(SPID.Text))<4 then Exit;
|
||||||
try
|
try
|
||||||
|
|
@ -488,9 +513,10 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.SPIDChange(Sender: TObject);
|
procedure TfrmDJBRKList.SPIDChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if Length(Trim(SPID.Text))<4 then
|
if Length(Trim(SPID.Text)) < 4 then
|
||||||
begin
|
begin
|
||||||
if Trim(SPID.Text)<>'' then Exit;
|
if Trim(SPID.Text) <> '' then
|
||||||
|
Exit;
|
||||||
end;
|
end;
|
||||||
TBFind.Click;
|
TBFind.Click;
|
||||||
end;
|
end;
|
||||||
|
|
@ -507,15 +533,16 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.OrderNoKeyPress(Sender: TObject; var Key: Char);
|
procedure TfrmDJBRKList.OrderNoKeyPress(Sender: TObject; var Key: Char);
|
||||||
begin
|
begin
|
||||||
IF trim(OrderNo.Text)='' then exit;
|
if trim(OrderNo.Text) = '' then
|
||||||
IF Key=#13 then
|
exit;
|
||||||
|
if Key = #13 then
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
Filtered:=False;
|
Filtered := False;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' select A.* ');
|
sql.Add(' select A.* ');
|
||||||
sql.Add(',OrderNO=(select OrderNO from JYOrder_Main JM where JM.MainId=A.ORDMainIdRK)');
|
sql.Add(',OrderNO=(select OrderNO from JYOrder_Main JM where JM.MainId=A.ORDMainIdRK)');
|
||||||
|
|
@ -524,16 +551,16 @@ begin
|
||||||
sql.Add(' ,PRTkuanNo=(select PRTkuanNo from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
sql.Add(' ,PRTkuanNo=(select PRTkuanNo from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
||||||
sql.Add(' ,PRTHX=(select PRTHX from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
sql.Add(' ,PRTHX=(select PRTHX from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
||||||
sql.Add(' from CK_SXPB_CR A');
|
sql.Add(' from CK_SXPB_CR A');
|
||||||
sql.add(' where exists(select MainID from JYOrder_Main X where X.mainID=A.ORDMainIdRK and X.orderNo like '+quotedstr('%'+trim(OrderNo.text)+'%')+')');
|
sql.add(' where exists(select MainID from JYOrder_Main X where X.mainID=A.ORDMainIdRK and X.orderNo like ' + quotedstr('%' + trim(OrderNo.text) + '%') + ')');
|
||||||
sql.Add(' and isnull(CKName,'''')=''´ý¼ì²¼''');
|
sql.Add(' and isnull(CKName,'''')=''´ý¼ì²¼''');
|
||||||
SQL.Add(' and CRFlag=''Èë¿â'' ');
|
SQL.Add(' and CRFlag=''Èë¿â'' ');
|
||||||
IF cxTabControl1.TabIndex<2 then
|
if cxTabControl1.TabIndex < 2 then
|
||||||
SQL.Add(' and isnull(A.chkstatus,''0'')='''+inttostr(cxTabControl1.TabIndex)+''' ');
|
SQL.Add(' and isnull(A.chkstatus,''0'')=''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
||||||
Open;
|
Open;
|
||||||
//ShowMessage(SQL.Text);
|
//ShowMessage(SQL.Text);
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||||
finally
|
finally
|
||||||
ADOQueryMain.EnableControls;
|
ADOQueryMain.EnableControls;
|
||||||
end;
|
end;
|
||||||
|
|
@ -542,10 +569,11 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.TBCHKClick(Sender: TObject);
|
procedure TfrmDJBRKList.TBCHKClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CDS_Main.IsEmpty then exit;
|
if CDS_Main.IsEmpty then
|
||||||
if CDS_Main.Locate('SSel',True,[])=False then
|
exit;
|
||||||
|
if CDS_Main.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!','提示',0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
try
|
try
|
||||||
|
|
@ -554,14 +582,14 @@ begin
|
||||||
DisableControls;
|
DisableControls;
|
||||||
while not eof do
|
while not eof do
|
||||||
begin
|
begin
|
||||||
IF fieldbyname('ssel').AsBoolean then
|
if fieldbyname('ssel').AsBoolean then
|
||||||
begin
|
begin
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
close;
|
close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('update CK_SXPB_CR SET chkstatus=''1'',chker='''+trim(DName)+''',chkTime=getdate() ');
|
sql.Add('update CK_SXPB_CR SET chkstatus=''1'',chker=''' + trim(DName) + ''',chkTime=getdate() ');
|
||||||
sql.Add('where SPID='+quotedstr(trim(CDS_Main.fieldbyname('SPID').AsString)));
|
sql.Add('where SPID=' + quotedstr(trim(CDS_Main.fieldbyname('SPID').AsString)));
|
||||||
execsql;
|
execsql;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
@ -569,19 +597,20 @@ begin
|
||||||
end;
|
end;
|
||||||
EnableControls;
|
EnableControls;
|
||||||
end;
|
end;
|
||||||
application.MessageBox('审核成功!','提示信息');
|
application.MessageBox('审核成功!', '提示信息');
|
||||||
TBRafresh.Click;
|
TBRafresh.Click;
|
||||||
except
|
except
|
||||||
application.MessageBox('审核失败!','提示信息',0);
|
application.MessageBox('审核失败!', '提示信息', 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.TBNOchkClick(Sender: TObject);
|
procedure TfrmDJBRKList.TBNOchkClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CDS_Main.IsEmpty then exit;
|
if CDS_Main.IsEmpty then
|
||||||
if CDS_Main.Locate('SSel',True,[])=False then
|
exit;
|
||||||
|
if CDS_Main.Locate('SSel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!','提示',0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
try
|
try
|
||||||
|
|
@ -590,14 +619,14 @@ begin
|
||||||
DisableControls;
|
DisableControls;
|
||||||
while not eof do
|
while not eof do
|
||||||
begin
|
begin
|
||||||
IF fieldbyname('ssel').AsBoolean then
|
if fieldbyname('ssel').AsBoolean then
|
||||||
begin
|
begin
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
close;
|
close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('update CK_SXPB_CR SET chkstatus=''0'',chker='''+trim(DName)+''',chkTime=getdate() ');
|
sql.Add('update CK_SXPB_CR SET chkstatus=''0'',chker=''' + trim(DName) + ''',chkTime=getdate() ');
|
||||||
sql.Add('where SPID='+quotedstr(trim(CDS_Main.fieldbyname('SPID').AsString)));
|
sql.Add('where SPID=' + quotedstr(trim(CDS_Main.fieldbyname('SPID').AsString)));
|
||||||
execsql;
|
execsql;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
@ -605,10 +634,10 @@ begin
|
||||||
end;
|
end;
|
||||||
EnableControls;
|
EnableControls;
|
||||||
end;
|
end;
|
||||||
application.MessageBox('撤销审核成功!','提示信息');
|
application.MessageBox('撤销审核成功!', '提示信息');
|
||||||
TBRafresh.Click;
|
TBRafresh.Click;
|
||||||
except
|
except
|
||||||
application.MessageBox('撤销审核失败!','提示信息',0);
|
application.MessageBox('撤销审核失败!', '提示信息', 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -621,64 +650,84 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.Button5Click(Sender: TObject);
|
procedure TfrmDJBRKList.Button5Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
IF CDS_Main.IsEmpty then exit;
|
if CDS_Main.IsEmpty then
|
||||||
IF trim(factoryName1.Text)='' then
|
exit;
|
||||||
|
if trim(factoryName1.Text) = '' then
|
||||||
begin
|
begin
|
||||||
application.MessageBox('加工厂不能为空!','提示信息',0);
|
application.MessageBox('加工厂不能为空!', '提示信息', 0);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if Application.MessageBox('确定要修改加工厂吗?','提示',32+4)<>IDYES then Exit;
|
if Application.MessageBox('确定要修改加工厂吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
try
|
try
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('update CK_SXPB_CR SET factoryName='''+trim(factoryName1.Text)+''',edittime=getdate() where SPID='''+Trim(CDS_Main.fieldbyname('SPID').AsString)+'''');
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' ' + quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim('待检布入库修改')));
|
||||||
|
sql.Add(',' + quotedstr(trim('入库单号:' + trim(CDS_Main.FieldByName('SPID').AsString) + ',原加工厂' + Trim(CDS_Main.fieldbyname('factoryName').AsString) + ',修改后' + trim(factoryName1.Text))));
|
||||||
|
sql.Add(',' + quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
|
sql.Add('update CK_SXPB_CR SET factoryName=''' + trim(factoryName1.Text) + ''',edittime=getdate() where SPID=''' + Trim(CDS_Main.fieldbyname('SPID').AsString) + '''');
|
||||||
// sql.Add('update WFB_MJJY SET factoryName='''+trim(factoryName1.Text)+''' where APID='''+Trim(CDS_Main.fieldbyname('SPID').AsString)+'''');
|
// sql.Add('update WFB_MJJY SET factoryName='''+trim(factoryName1.Text)+''' where APID='''+Trim(CDS_Main.fieldbyname('SPID').AsString)+'''');
|
||||||
ExecSQL;
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
Application.MessageBox('保存成功!','提示',0);
|
Application.MessageBox('保存成功!', '提示', 0);
|
||||||
Panel5.Visible:=false;
|
Panel5.Visible := false;
|
||||||
TBRafresh.Click;
|
TBRafresh.Click;
|
||||||
except
|
except
|
||||||
Application.MessageBox('保存失败!','提示',0);
|
Application.MessageBox('保存失败!', '提示', 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.Button1Click(Sender: TObject);
|
procedure TfrmDJBRKList.Button1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
IF CDS_Main.IsEmpty then exit;
|
if CDS_Main.IsEmpty then
|
||||||
IF trim(Com_CRype.Text)='' then
|
exit;
|
||||||
|
if trim(Com_CRype.Text) = '' then
|
||||||
begin
|
begin
|
||||||
application.MessageBox('入库类型不能为空!','提示信息',0);
|
application.MessageBox('入库类型不能为空!', '提示信息', 0);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if Application.MessageBox('确定要修改入库类型吗?','提示',32+4)<>IDYES then Exit;
|
if Application.MessageBox('确定要修改入库类型吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
try
|
try
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('update CK_SXPB_CR SET CRType='''+trim(Com_CRype.Text)+''' where SPID='''+Trim(CDS_Main.fieldbyname('SPID').AsString)+'''');
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' ' + quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim('待检布入库修改')));
|
||||||
|
sql.Add(',' + quotedstr(trim('入库单号:' + trim(CDS_Main.FieldByName('SPID').AsString) + ',原入库类型' + Trim(CDS_Main.fieldbyname('CRType').AsString) + ',修改后' + trim(Com_CRype.Text))));
|
||||||
|
sql.Add(',' + quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
|
sql.Add('update CK_SXPB_CR SET CRType=''' + trim(Com_CRype.Text) + ''' where SPID=''' + Trim(CDS_Main.fieldbyname('SPID').AsString) + '''');
|
||||||
ExecSQL;
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
Application.MessageBox('保存成功!','提示',0);
|
Application.MessageBox('保存成功!', '提示', 0);
|
||||||
Panel5.Visible:=false;
|
Panel5.Visible := false;
|
||||||
TBRafresh.Click;
|
TBRafresh.Click;
|
||||||
except
|
except
|
||||||
Application.MessageBox('保存失败!','提示',0);
|
Application.MessageBox('保存失败!', '提示', 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.factoryName1BtnClick(Sender: TObject);
|
procedure TfrmDJBRKList.factoryName1BtnClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
frmZdyAttachGYS:=TfrmZdyAttachGYS.Create(Application);
|
frmZdyAttachGYS := TfrmZdyAttachGYS.Create(Application);
|
||||||
with frmZdyAttachGYS do
|
with frmZdyAttachGYS do
|
||||||
begin
|
begin
|
||||||
if ShowModal=1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
factoryName1.Text:=Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyName').AsString);
|
factoryName1.Text := Trim(frmZdyAttachGYS.CDS_HZ.fieldbyname('ZdyName').AsString);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
|
|
@ -688,29 +737,31 @@ end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.TBTSeditClick(Sender: TObject);
|
procedure TfrmDJBRKList.TBTSeditClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
factoryName1.Text:='';
|
factoryName1.Text := '';
|
||||||
Com_CRype.Text:='';
|
Com_CRype.Text := '';
|
||||||
edit_defstr2.Text:='';
|
edit_defstr2.Text := '';
|
||||||
edit_gangNo.Text:='';
|
edit_gangNo.Text := '';
|
||||||
edit_note.Text:='';
|
edit_note.Text := '';
|
||||||
Panel5.Left:=(self.Width-Panel5.Width) div 2;
|
Panel5.Left := (self.Width - Panel5.Width) div 2;
|
||||||
Panel5.Visible:=true;
|
Panel5.Visible := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.Button6Click(Sender: TObject);
|
procedure TfrmDJBRKList.Button6Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Panel5.Visible:=false;
|
Panel5.Visible := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.Button2Click(Sender: TObject);
|
procedure TfrmDJBRKList.Button2Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
IF CDS_Main.IsEmpty then exit;
|
if CDS_Main.IsEmpty then
|
||||||
IF trim(edit_defstr2.Text)='' then
|
exit;
|
||||||
|
if trim(edit_defstr2.Text) = '' then
|
||||||
begin
|
begin
|
||||||
application.MessageBox('统计单号不能为空!','提示信息',0);
|
application.MessageBox('统计单号不能为空!', '提示信息', 0);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if Application.MessageBox('确定要修改统计单号吗?','提示',32+4)<>IDYES then Exit;
|
if Application.MessageBox('确定要修改统计单号吗?', '提示', 32 + 4) <> IDYES then
|
||||||
|
Exit;
|
||||||
try
|
try
|
||||||
with CDS_Main do
|
with CDS_Main do
|
||||||
begin
|
begin
|
||||||
|
|
@ -718,13 +769,21 @@ begin
|
||||||
first;
|
first;
|
||||||
while not eof do
|
while not eof do
|
||||||
begin
|
begin
|
||||||
IF fieldbyName('Ssel').AsBoolean then
|
if fieldbyName('Ssel').AsBoolean then
|
||||||
begin
|
begin
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('update CK_SXPB_CR SET defstr2='''+trim(edit_defstr2.Text)+''' where SPID='''+Trim(CDS_Main.fieldbyname('SPID').AsString)+'''');
|
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||||
|
sql.Add(' ' + quotedstr(trim(DName)));
|
||||||
|
sql.Add(',getdate() ');
|
||||||
|
sql.Add(',' + quotedstr(trim(self.Caption)));
|
||||||
|
sql.Add(',' + quotedstr(trim('待检布入库修改')));
|
||||||
|
sql.Add(',' + quotedstr(trim('入库单号:' + trim(CDS_Main.FieldByName('SPID').AsString) + ',原统计单号' + Trim(CDS_Main.fieldbyname('defstr2').AsString) + ',修改后' + trim(edit_defstr2.Text))));
|
||||||
|
sql.Add(',' + quotedstr(trim('成功')));
|
||||||
|
sql.Add(')');
|
||||||
|
sql.Add('update CK_SXPB_CR SET defstr2=''' + trim(edit_defstr2.Text) + ''' where SPID=''' + Trim(CDS_Main.fieldbyname('SPID').AsString) + '''');
|
||||||
ExecSQL;
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
@ -733,25 +792,26 @@ begin
|
||||||
EnableControls;
|
EnableControls;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Application.MessageBox('保存成功!','提示',0);
|
Application.MessageBox('保存成功!', '提示', 0);
|
||||||
Panel5.Visible:=false;
|
Panel5.Visible := false;
|
||||||
TBRafresh.Click;
|
TBRafresh.Click;
|
||||||
except
|
except
|
||||||
Application.MessageBox('保存失败!','提示',0);
|
Application.MessageBox('保存失败!', '提示', 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDJBRKList.defstr2KeyPress(Sender: TObject; var Key: Char);
|
procedure TfrmDJBRKList.defstr2KeyPress(Sender: TObject; var Key: Char);
|
||||||
begin
|
begin
|
||||||
IF trim(defstr2.Text)='' then exit;
|
if trim(defstr2.Text) = '' then
|
||||||
IF Key=#13 then
|
exit;
|
||||||
|
if Key = #13 then
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
with ADOQueryMain do
|
with ADOQueryMain do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
Filtered:=False;
|
Filtered := False;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' select A.* ');
|
sql.Add(' select A.* ');
|
||||||
sql.Add(',OrderNO=(select OrderNO from JYOrder_Main JM where JM.MainId=A.ORDMainIdRK)');
|
sql.Add(',OrderNO=(select OrderNO from JYOrder_Main JM where JM.MainId=A.ORDMainIdRK)');
|
||||||
|
|
@ -760,16 +820,16 @@ begin
|
||||||
sql.Add(' ,PRTkuanNo=(select PRTkuanNo from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
sql.Add(' ,PRTkuanNo=(select PRTkuanNo from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
||||||
sql.Add(' ,PRTHX=(select PRTHX from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
sql.Add(' ,PRTHX=(select PRTHX from JYOrder_Sub JM where JM.SubId=A.OrdSubIdRK )');
|
||||||
sql.Add(' from CK_SXPB_CR A');
|
sql.Add(' from CK_SXPB_CR A');
|
||||||
sql.add(' where A.defstr2 like '+quotedstr('%'+trim(OrderNo.text)+'%'));
|
sql.add(' where A.defstr2 like ' + quotedstr('%' + trim(OrderNo.text) + '%'));
|
||||||
sql.Add(' and isnull(CKName,'''')=''´ý¼ì²¼''');
|
sql.Add(' and isnull(CKName,'''')=''´ý¼ì²¼''');
|
||||||
SQL.Add(' and CRFlag=''Èë¿â'' ');
|
SQL.Add(' and CRFlag=''Èë¿â'' ');
|
||||||
IF cxTabControl1.TabIndex<2 then
|
if cxTabControl1.TabIndex < 2 then
|
||||||
SQL.Add(' and isnull(A.chkstatus,''0'')='''+inttostr(cxTabControl1.TabIndex)+''' ');
|
SQL.Add(' and isnull(A.chkstatus,''0'')=''' + inttostr(cxTabControl1.TabIndex) + ''' ');
|
||||||
Open;
|
Open;
|
||||||
//ShowMessage(SQL.Text);
|
//ShowMessage(SQL.Text);
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain,CDS_Main);
|
SCreateCDS20(ADOQueryMain, CDS_Main);
|
||||||
SInitCDSData20(ADOQueryMain,CDS_Main);
|
SInitCDSData20(ADOQueryMain, CDS_Main);
|
||||||
finally
|
finally
|
||||||
ADOQueryMain.EnableControls;
|
ADOQueryMain.EnableControls;
|
||||||
end;
|
end;
|
||||||
|
|
@ -777,3 +837,4 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user