增加页面
This commit is contained in:
parent
0ba0b75c88
commit
e11c0d4666
|
|
@ -1,6 +1,6 @@
|
|||
object frmClothContractList: TfrmClothContractList
|
||||
Left = 109
|
||||
Top = 139
|
||||
Left = 348
|
||||
Top = 303
|
||||
Width = 1171
|
||||
Height = 571
|
||||
Caption = #22383#24067#37319#36141#21512#21516
|
||||
|
|
@ -78,16 +78,32 @@ object frmClothContractList: TfrmClothContractList
|
|||
ImageIndex = 17
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object Tchk: TToolButton
|
||||
object TReview: TToolButton
|
||||
Left = 315
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23457#26680
|
||||
ImageIndex = 41
|
||||
OnClick = TReviewClick
|
||||
end
|
||||
object TnoReview: TToolButton
|
||||
Left = 378
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25764#38144#23457#26680
|
||||
ImageIndex = 129
|
||||
OnClick = TnoReviewClick
|
||||
end
|
||||
object Tchk: TToolButton
|
||||
Left = 465
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23436#25104
|
||||
ImageIndex = 41
|
||||
OnClick = TchkClick
|
||||
end
|
||||
object TNochk: TToolButton
|
||||
Left = 378
|
||||
Left = 528
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25764#38144#23436#25104
|
||||
|
|
@ -95,7 +111,7 @@ object frmClothContractList: TfrmClothContractList
|
|||
OnClick = TNochkClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 465
|
||||
Left = 615
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
|
|
@ -103,7 +119,7 @@ object frmClothContractList: TfrmClothContractList
|
|||
OnClick = TBExportClick
|
||||
end
|
||||
object TBPrint: TToolButton
|
||||
Left = 528
|
||||
Left = 678
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
|
|
@ -111,7 +127,7 @@ object frmClothContractList: TfrmClothContractList
|
|||
OnClick = TBPrintClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 591
|
||||
Left = 741
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #37319#36141#38468#20214
|
||||
|
|
@ -119,7 +135,7 @@ object frmClothContractList: TfrmClothContractList
|
|||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 678
|
||||
Left = 828
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
@ -307,7 +323,7 @@ object frmClothContractList: TfrmClothContractList
|
|||
TabOrder = 0
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnCellClick = Tv1CellClick
|
||||
OnCellDblClick = Tv1CellDblClick
|
||||
OnCustomDrawCell = Tv1CustomDrawCell
|
||||
|
|
@ -415,14 +431,14 @@ object frmClothContractList: TfrmClothContractList
|
|||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
Style = 9
|
||||
TabIndex = 0
|
||||
TabOrder = 3
|
||||
Tabs.Strings = (
|
||||
#26410#23436#25104
|
||||
#23436#25104
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 9
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
#26410#23457#26680
|
||||
#24050#23457#26680
|
||||
#20840#37096)
|
||||
Visible = False
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 22
|
||||
ClientRectRight = 1155
|
||||
|
|
@ -430,13 +446,13 @@ object frmClothContractList: TfrmClothContractList
|
|||
end
|
||||
object cxGrid2: TcxGrid
|
||||
Left = 0
|
||||
Top = 356
|
||||
Top = 355
|
||||
Width = 1155
|
||||
Height = 177
|
||||
Align = alBottom
|
||||
TabOrder = 4
|
||||
object TV2: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
DataController.DataSource = DSsub
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
DataController.Summary.DefaultGroupSummaryItems = <
|
||||
|
|
@ -585,7 +601,7 @@ object frmClothContractList: TfrmClothContractList
|
|||
DataBinding.FieldName = 'Sdefstr5'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Hidden = True
|
||||
VisibleForCustomization = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column14: TcxGridDBColumn
|
||||
|
|
@ -608,7 +624,7 @@ object frmClothContractList: TfrmClothContractList
|
|||
end
|
||||
object cxSplitter1: TcxSplitter
|
||||
Left = 0
|
||||
Top = 348
|
||||
Top = 347
|
||||
Width = 1155
|
||||
Height = 8
|
||||
HotZoneClassName = 'TcxMediaPlayer9Style'
|
||||
|
|
|
|||
|
|
@ -6,11 +6,24 @@ uses
|
|||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
|
||||
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses,
|
||||
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
|
||||
cxGridDBTableView, cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter,
|
||||
RM_Common, RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport,
|
||||
cxTextEdit, cxPC, cxDropDownEdit;
|
||||
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
|
||||
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
|
||||
cxGrid, DBClient, cxCalendar, cxButtonEdit, cxSplitter, RM_Common, RM_Class,
|
||||
RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, cxTextEdit, cxPC,
|
||||
cxDropDownEdit, 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, dxBarBuiltInMenu;
|
||||
|
||||
type
|
||||
TfrmClothContractList = class(TForm)
|
||||
|
|
@ -100,6 +113,8 @@ type
|
|||
Image2: TImage;
|
||||
Button1: TButton;
|
||||
RadioGroup1: TRadioGroup;
|
||||
TReview: TToolButton;
|
||||
TnoReview: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
|
@ -113,48 +128,36 @@ type
|
|||
procedure TBAddClick(Sender: TObject);
|
||||
procedure ConNoChange(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
||||
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure Tv3MouseDown(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
procedure Tv2CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure Tv3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure Tv2CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure v2Column3PropertiesButtonClick(Sender: TObject;
|
||||
AButtonIndex: Integer);
|
||||
procedure v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
procedure conPress(Sender: TObject; var Key: Char);
|
||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure TchkClick(Sender: TObject);
|
||||
procedure TNochkClick(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView;
|
||||
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||
var ADone: Boolean);
|
||||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure Image2Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure SQNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure TReviewClick(Sender: TObject);
|
||||
procedure TnoReviewClick(Sender: TObject);
|
||||
private
|
||||
FInt,PFInt:Integer;
|
||||
FInt, PFInt: Integer;
|
||||
procedure InitGrid();
|
||||
procedure InitForm();
|
||||
function DelData():Boolean;
|
||||
function DelData(): Boolean;
|
||||
procedure SetStatus();
|
||||
procedure InitSub();
|
||||
{ Private declarations }
|
||||
public
|
||||
FType:string;
|
||||
FType: string;
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
|
|
@ -162,118 +165,141 @@ var
|
|||
frmClothContractList: TfrmClothContractList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink,U_ClothContractInPutPB,U_Fun,U_ProductOrderList,U_ZDYHelp,
|
||||
U_DataLink, U_ClothContractInPutPB, U_Fun, U_ProductOrderList, U_ZDYHelp,
|
||||
U_FjList_RZ;
|
||||
|
||||
{$R *.dfm}
|
||||
procedure TfrmClothContractList.InitSub();
|
||||
begin
|
||||
ADOQuerySub.Close;
|
||||
IF Order_Main.IsEmpty then exit;
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
with ADOQuerySub do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select * from Contract_Sub ');
|
||||
sql.Add('where mainID ='+quotedstr((Order_Main.fieldbyname('mainID').AsString)));
|
||||
sql.Add('where mainID =' + quotedstr((Order_Main.fieldbyname('mainID').AsString)));
|
||||
open;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.SetStatus();
|
||||
begin
|
||||
TBAdd.Visible:=false;
|
||||
tchk.Visible:=false;
|
||||
tnochk.Visible:=false;
|
||||
tbedit.Visible:=false;
|
||||
tbdel.Visible:=false;
|
||||
IF FType=''then
|
||||
TBAdd.Visible := false;
|
||||
tchk.Visible := false;
|
||||
tnochk.Visible := false;
|
||||
TReview.Visible := false;
|
||||
tnoReview.Visible := false;
|
||||
tbedit.Visible := false;
|
||||
tbdel.Visible := false;
|
||||
if FType = '' then
|
||||
begin
|
||||
if Trim(DParameters1) = '高权限' then
|
||||
begin
|
||||
case cxTabControl1.TabIndex of
|
||||
0:begin
|
||||
// tchk.Visible:=true;
|
||||
tbedit.Visible:=true;
|
||||
tbdel.Visible:=true;
|
||||
TBAdd.Visible:=true;
|
||||
0:
|
||||
begin
|
||||
TReview.Visible := true;
|
||||
tbedit.Visible := true;
|
||||
tbdel.Visible := true;
|
||||
TBAdd.Visible := true;
|
||||
end;
|
||||
1:begin
|
||||
// tnochk.Visible:=true;
|
||||
1:
|
||||
begin
|
||||
tnoReview.Visible := true;
|
||||
end;
|
||||
2:begin
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
case cxTabControl1.TabIndex of
|
||||
0:
|
||||
begin
|
||||
tbedit.Visible := true;
|
||||
tbdel.Visible := true;
|
||||
TBAdd.Visible := true;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
IF FType='查询' then
|
||||
|
||||
end;
|
||||
if FType = '查询' then
|
||||
begin
|
||||
Tbadd.Visible:=false;
|
||||
TBPrint.Visible:=false;
|
||||
Tbadd.Visible := false;
|
||||
TBPrint.Visible := false;
|
||||
//v1Price.Visible:=false;
|
||||
// v1PriceUnit.Visible:=false;
|
||||
// v1Money.Visible:=false;
|
||||
|
||||
// v1Price.Hidden:=true;
|
||||
// v1PriceUnit.Hidden:=true;
|
||||
// v1Money.Hidden:=true;
|
||||
cxTabControl1.TabIndex:=2;
|
||||
cxTabControl1.Visible:=false;
|
||||
cxTabControl1.TabIndex := 2;
|
||||
cxTabControl1.Visible := false;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
frmClothContractList:=nil;
|
||||
frmClothContractList := nil;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.FormClose(Sender: TObject;
|
||||
var Action: TCloseAction);
|
||||
procedure TfrmClothContractList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action:=caFree;
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
ScrollBox1.Align:=alClient;
|
||||
ScrollBox1.Align := alClient;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.TBCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
WriteCxGrid(self.Caption+tv1.Name+'1',Tv1,'指示单管理');
|
||||
WriteCxGrid(self.Caption+tv2.Name,Tv2,'指示单管理');
|
||||
WriteCxGrid(self.Caption + tv1.Name + '1', Tv1, '指示单管理');
|
||||
WriteCxGrid(self.Caption + tv2.Name, Tv2, '指示单管理');
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.InitGrid();
|
||||
var strwhere: string;
|
||||
var
|
||||
strwhere: string;
|
||||
begin
|
||||
strwhere:=' where QDTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''''
|
||||
+' and QDTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+''''
|
||||
+' and HTType=''采购合同''';
|
||||
IF cxTabControl1.TabIndex=0 then
|
||||
strwhere:=strwhere+' and isnull(C_status,''0'')=''0'' ';
|
||||
IF cxTabControl1.TabIndex=1 then
|
||||
strwhere:=strwhere+' and isnull(C_status,''0'')=''1'' ';
|
||||
strwhere := ' where QDTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''' + ' and QDTime<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.DateTime + 1)) + '''' + ' and HTType=''采购合同''';
|
||||
// if cxTabControl1.TabIndex = 0 then
|
||||
// strwhere := strwhere + ' and isnull(C_status,''0'')=''0'' ';
|
||||
// if cxTabControl1.TabIndex = 1 then
|
||||
// strwhere := strwhere + ' and isnull(C_status,''0'')=''1'' ';
|
||||
// if cxTabControl1.TabIndex < 2 then
|
||||
// begin
|
||||
// strwhere := strwhere + ' and isnull(A.ChkStatus,''0'')=''' + inttostr(cxTabControl1.TabIndex) + '''';
|
||||
// end;
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from Contract_Main A');
|
||||
sql.Add(' where QDTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''' ');
|
||||
sql.Add(' and QDTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+''' ');
|
||||
sql.Add(' where QDTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||
sql.Add(' and QDTime<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.DateTime + 1)) + ''' ');
|
||||
sql.Add(' and HTType=''采购合同'' ');
|
||||
// IF cxTabControl1.TabIndex=0 then
|
||||
// sql.Add(' and isnull(C_status,''0'')=''0'' ');
|
||||
// IF cxTabControl1.TabIndex=1 then
|
||||
// sql.Add(' and isnull(C_status,''0'')=''1'' ');
|
||||
if cxTabControl1.TabIndex = 0 then
|
||||
sql.Add(' and isnull(A.ChkStatus,''0'')=''0'' ');
|
||||
if cxTabControl1.TabIndex = 1 then
|
||||
sql.Add(' and isnull(A.ChkStatus,''0'')=''1'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
TBFind.Click;
|
||||
|
|
@ -282,13 +308,14 @@ end;
|
|||
|
||||
procedure TfrmClothContractList.InitForm();
|
||||
begin
|
||||
ReadCxGrid(self.Caption+tv1.Name+'1',Tv1,'指示单管理');
|
||||
ReadCxGrid(self.Caption+tv2.Name,Tv2,'指示单管理');
|
||||
cxTabControl1.TabIndex:=0;
|
||||
if Trim(DParameters1)='1' then
|
||||
ReadCxGrid(self.Caption + tv1.Name + '1', Tv1, '指示单管理');
|
||||
ReadCxGrid(self.Caption + tv2.Name, Tv2, '指示单管理');
|
||||
cxTabControl1.TabIndex := 0;
|
||||
if Trim(DParameters1) = '1' then
|
||||
begin
|
||||
TBPrint.Visible:=False;
|
||||
end else
|
||||
TBPrint.Visible := False;
|
||||
end
|
||||
else
|
||||
begin
|
||||
// v1Column1.Visible:=True;
|
||||
// v1Column1.Hidden:=False;
|
||||
|
|
@ -296,32 +323,34 @@ begin
|
|||
// v1PRTUnit.Hidden:=False;
|
||||
// v1PRTQty.Visible:=True;
|
||||
// v1PRTQty.Hidden:=False;
|
||||
TBPrint.Visible:=True;
|
||||
TBPrint.Visible := True;
|
||||
end;
|
||||
BegDate.DateTime:=SGetServerDate10(ADOQueryTemp)-7;
|
||||
EndDate.DateTime:=SGetServerDate10(ADOQueryTemp);
|
||||
BegDate.DateTime := SGetServerDate10(ADOQueryTemp) - 7;
|
||||
EndDate.DateTime := SGetServerDate10(ADOQueryTemp);
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.TBFindClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.TBEditClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmClothContractInPutPB:=TfrmClothContractInPutPB.Create(Application);
|
||||
frmClothContractInPutPB := TfrmClothContractInPutPB.Create(Application);
|
||||
with frmClothContractInPutPB do
|
||||
begin
|
||||
PState:=1;
|
||||
FMainId:=Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||
FConNo:=Trim(Self.Order_Main.fieldbyname('ConNo').AsString);
|
||||
if ShowModal=1 then
|
||||
PState := 1;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||
FConNo := Trim(Self.Order_Main.fieldbyname('ConNo').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
|
@ -333,13 +362,15 @@ end;
|
|||
|
||||
procedure TfrmClothContractList.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if ClientDataSet2.IsEmpty=false then
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
if ClientDataSet2.IsEmpty = false then
|
||||
begin
|
||||
Application.MessageBox('已到坯,不能删除坯布合同!','提示',0);
|
||||
Application.MessageBox('已到坯,不能删除坯布合同!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要删除数据吗?','提示',32+4)<>IDYES then Exit;
|
||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
if DelData() then
|
||||
begin
|
||||
//TBRafresh.Click;
|
||||
|
|
@ -348,45 +379,46 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
function TfrmClothContractList.DelData():Boolean;
|
||||
function TfrmClothContractList.DelData(): Boolean;
|
||||
begin
|
||||
try
|
||||
Result:=false;
|
||||
Result := false;
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete from Contract_Sub where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||
sql.Add('delete Contract_Main where MainId='''+Trim(Order_Main.fieldbyname('MainId').AsString)+'''');
|
||||
sql.Add('delete from Contract_Sub where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
sql.Add('delete Contract_Main where MainId=''' + Trim(Order_Main.fieldbyname('MainId').AsString) + '''');
|
||||
execsql;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
Result:=True;
|
||||
Result := True;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Result:=False;
|
||||
Application.MessageBox('数据删除异常!','提示',0);
|
||||
Result := False;
|
||||
Application.MessageBox('数据删除异常!', '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.TBExportClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.IsEmpty then Exit;
|
||||
TcxGridToExcel('坯布合同订单列表',cxGrid1);
|
||||
if ADOQueryMain.IsEmpty then
|
||||
Exit;
|
||||
TcxGridToExcel('坯布合同订单列表', cxGrid1);
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.TBPrintClick(Sender: TObject);
|
||||
var
|
||||
fPrintFile,FConNoM:string;
|
||||
|
||||
fPrintFile, FConNoM: string;
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
|
||||
Panel4.Left:=(self.Width - Panel4.Width ) div 2;
|
||||
Panel4.Visible:=true;
|
||||
Panel4.Left := (self.Width - Panel4.Width) div 2;
|
||||
Panel4.Visible := true;
|
||||
|
||||
{ fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\坯布订购合同.rmf' ;
|
||||
with ADOQueryTemp do
|
||||
|
|
@ -426,12 +458,12 @@ end;
|
|||
procedure TfrmClothContractList.TBAddClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmClothContractInPutPB:=TfrmClothContractInPutPB.Create(Application);
|
||||
frmClothContractInPutPB := TfrmClothContractInPutPB.Create(Application);
|
||||
with frmClothContractInPutPB do
|
||||
begin
|
||||
PState:=0;
|
||||
FMainId:='';
|
||||
if ShowModal=1 then
|
||||
PState := 0;
|
||||
FMainId := '';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
|
@ -443,10 +475,11 @@ end;
|
|||
|
||||
procedure TfrmClothContractList.ConNoChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active=False then Exit;
|
||||
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
if ADOQueryMain.Active = False then
|
||||
Exit;
|
||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.FormShow(Sender: TObject);
|
||||
|
|
@ -455,10 +488,7 @@ begin
|
|||
SetStatus();
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.Tv1FocusedRecordChanged(
|
||||
Sender: TcxCustomGridTableView; APrevFocusedRecord,
|
||||
AFocusedRecord: TcxCustomGridRecord;
|
||||
ANewItemRecordFocusingChanged: Boolean);
|
||||
procedure TfrmClothContractList.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
|
||||
begin
|
||||
{ with ADOQueryTemp do
|
||||
begin
|
||||
|
|
@ -487,28 +517,22 @@ begin
|
|||
SInitCDSData20(ADOQueryTemp,ClientDataSet3); }
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.Tv2MouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure TfrmClothContractList.Tv2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
FInt:=2;
|
||||
FInt := 2;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.Tv1MouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure TfrmClothContractList.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
FInt:=1;
|
||||
FInt := 1;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.Tv3MouseDown(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure TfrmClothContractList.Tv3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
FInt:=3;
|
||||
FInt := 3;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.Tv2CellClick(
|
||||
Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure TfrmClothContractList.Tv2CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
|
|
@ -518,35 +542,34 @@ begin
|
|||
sql.Add('C_Unit=(select Top 1 C_Unit from Contract_Sub AA,Contract_Sub_Mx BB where AA.SubId=BB.SubId and BB.MXid=A.Mxid)');
|
||||
SQL.Add(' from Contract_Sub_MxTo A inner join JYOrder_Sub B on A.OrdSubId=B.SubId ');
|
||||
SQL.Add(' inner join JYOrder_Main C on C.MainId=B.MainId ');
|
||||
sql.Add('where A.MxId='''+Trim(ClientDataSet2.fieldbyname('MxId').AsString)+'''');
|
||||
sql.Add('where A.MxId=''' + Trim(ClientDataSet2.fieldbyname('MxId').AsString) + '''');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryTemp,ClientDataSet3);
|
||||
SCreateCDS20(ADOQueryTemp, ClientDataSet3);
|
||||
SInitCDSData20(ADOQueryTemp, ClientDataSet3);
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.ToolButton5Click(Sender: TObject);
|
||||
var
|
||||
maxno:string;
|
||||
maxno: string;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.v2Column3PropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
procedure TfrmClothContractList.v2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp:=TfrmZDYHelp.Create(Application);
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag:='RKPlace';
|
||||
flagname:='入库地点';
|
||||
if ShowModal=1 then
|
||||
flag := 'RKPlace';
|
||||
flagname := '入库地点';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
with ClientDataSet2 do
|
||||
begin
|
||||
Edit;
|
||||
FieldByName('RKPlace').Value:=Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
FieldByName('RKPlace').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZDYName').AsString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
@ -555,8 +578,7 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.conPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
procedure TfrmClothContractList.conPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
{if Key=#13 then
|
||||
begin
|
||||
|
|
@ -581,24 +603,22 @@ begin
|
|||
end; }
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.Tv1CellDblClick(
|
||||
Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure TfrmClothContractList.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
|
||||
If Order_Main.IsEmpty then Exit;
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmClothContractInPutPB:=TfrmClothContractInPutPB.Create(Application);
|
||||
frmClothContractInPutPB := TfrmClothContractInPutPB.Create(Application);
|
||||
with frmClothContractInPutPB do
|
||||
begin
|
||||
PState:=1;
|
||||
ToolBar1.Enabled:=false;
|
||||
ToolBar2.Enabled:=false;
|
||||
Tv1.OptionsData.Editing:=false;
|
||||
FMainId:=Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||
FConNo:=Trim(Self.Order_Main.fieldbyname('ConNoM').AsString);
|
||||
if ShowModal=1 then
|
||||
PState := 1;
|
||||
ToolBar1.Enabled := false;
|
||||
ToolBar2.Enabled := false;
|
||||
Tv1.OptionsData.Editing := false;
|
||||
FMainId := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||
FConNo := Trim(Self.Order_Main.fieldbyname('ConNoM').AsString);
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
|
|
@ -610,39 +630,41 @@ end;
|
|||
|
||||
procedure TfrmClothContractList.TchkClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then exit;
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update Contract_Sub SET C_status=''1'' ');
|
||||
sql.Add('where subID='+quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||
sql.Add('where subID=' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
application.MessageBox('采购完成!','提示信息');
|
||||
application.MessageBox('采购完成!', '提示信息');
|
||||
TBRafresh.Click;
|
||||
except
|
||||
application.MessageBox('采购失败!','提示信息',0);
|
||||
application.MessageBox('采购失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.TNochkClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then exit;
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update Contract_Sub SET C_status=''0'' ');
|
||||
sql.Add('where subID='+quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||
sql.Add('where subID=' + quotedstr(trim(Order_Main.fieldbyname('subID').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
application.MessageBox('撤销成功!','提示信息');
|
||||
application.MessageBox('撤销成功!', '提示信息');
|
||||
TBRafresh.Click;
|
||||
except
|
||||
application.MessageBox('撤销失败!','提示信息',0);
|
||||
application.MessageBox('撤销失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -652,9 +674,7 @@ begin
|
|||
TBRafresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.Tv1CustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
procedure TfrmClothContractList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
begin
|
||||
{ if cxTabControl1.TabIndex=0 then
|
||||
begin
|
||||
|
|
@ -678,16 +698,17 @@ end;
|
|||
|
||||
procedure TfrmClothContractList.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
try
|
||||
frmFjList_RZ:=TfrmFjList_RZ.Create(Application);
|
||||
frmFjList_RZ := TfrmFjList_RZ.Create(Application);
|
||||
with frmFjList_RZ do
|
||||
begin
|
||||
// PState:=1;
|
||||
// if Trim(canshu1)<>'高权限' then cxButton1.Visible:=false;
|
||||
fkeyNO:=Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||
fType:='布匹采购';
|
||||
if ShowModal=1 then
|
||||
fkeyNO := Trim(Self.Order_Main.fieldbyname('MainId').AsString);
|
||||
fType := '布匹采购';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
|
||||
end;
|
||||
|
|
@ -697,74 +718,112 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.Tv1CellClick(
|
||||
Sender: TcxCustomGridTableView;
|
||||
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
|
||||
AShift: TShiftState; var AHandled: Boolean);
|
||||
procedure TfrmClothContractList.Tv1CellClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
|
||||
begin
|
||||
InitSub();
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.Image2Click(Sender: TObject);
|
||||
begin
|
||||
Panel4.Visible:=false;
|
||||
Panel4.Visible := false;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.Button1Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile,FConNoM:string;
|
||||
|
||||
fPrintFile, FConNoM: string;
|
||||
begin
|
||||
if Order_Main.IsEmpty then Exit;
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
// fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\坯布订购合同.rmf' ;
|
||||
fPrintFile:= ExtractFilePath(Application.ExeName) + 'Report\'+Trim(RadioGroup1.Items.Strings[RadioGroup1.ItemIndex])+'.rmf' ;
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(RadioGroup1.Items.Strings[RadioGroup1.ItemIndex]) + '.rmf';
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
Filtered:=False;
|
||||
Filtered := False;
|
||||
sql.Clear;
|
||||
sql.Add('exec ClothContract_QryList :MainId,:WSql');
|
||||
Parameters.ParamByName('WSql').Value:=' and FillTime>='''+Trim(FormatDateTime('yyyy-MM-dd',BegDate.DateTime))+''''
|
||||
+' and FillTime<'''+Trim(FormatDateTime('yyyy-MM-dd',EndDate.DateTime+1))+'''';
|
||||
Parameters.ParamByName('MainId').Value:=Trim(Order_Main.fieldbyname('MainId').AsString);
|
||||
Parameters.ParamByName('WSql').Value:='';
|
||||
Parameters.ParamByName('WSql').Value := ' and FillTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''' + ' and FillTime<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.DateTime + 1)) + '''';
|
||||
Parameters.ParamByName('MainId').Value := Trim(Order_Main.fieldbyname('MainId').AsString);
|
||||
Parameters.ParamByName('WSql').Value := '';
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp,CDS_PRT);
|
||||
SInitCDSData20(ADOQueryTemp,CDS_PRT);
|
||||
FConNoM:=Trim(CDS_PRT.fieldbyname('ConNoM').AsString);
|
||||
SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||||
FConNoM := Trim(CDS_PRT.fieldbyname('ConNoM').AsString);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end else
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找到'+trim(fPrintFile)),'提示',0);
|
||||
Application.MessageBox(PChar('没有找到' + trim(fPrintFile)), '提示', 0);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.SQNOKeyPress(Sender: TObject;
|
||||
var Key: Char);
|
||||
procedure TfrmClothContractList.SQNOKeyPress(Sender: TObject; var Key: Char);
|
||||
begin
|
||||
|
||||
IF key=#13 then
|
||||
if Key = #13 then
|
||||
begin
|
||||
IF trim(SQNo.Text)='' then exit;
|
||||
if trim(SQNo.Text) = '' then
|
||||
exit;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Filtered:=False;
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select A.* ');
|
||||
sql.Add(' from Contract_Main A');
|
||||
sql.Add(' where SQNO like ''%'+trim(SQNo.Text)+'%'' ');
|
||||
sql.Add(' where SQNO like ''%' + trim(SQNo.Text) + '%'' ');
|
||||
sql.Add(' and HTType=''采购合同'' ');
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryMain,Order_Main);
|
||||
SInitCDSData20(ADOQueryMain,Order_Main);
|
||||
SCreateCDS20(ADOQueryMain, Order_Main);
|
||||
SInitCDSData20(ADOQueryMain, Order_Main);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.TReviewClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update Contract_Main SET ChkStatus=''1'',chktime=getdate(),chker=' + quotedstr(trim(Dname)));
|
||||
sql.Add('where MainId=' + quotedstr(trim(Order_Main.fieldbyname('MainId').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
application.MessageBox('坯布采购审核成功!', '提示信息');
|
||||
TBRafresh.Click;
|
||||
except
|
||||
application.MessageBox('坯布采购审核失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothContractList.TnoReviewClick(Sender: TObject);
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
exit;
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update Contract_Main SET ChkStatus=''0'',chktime=null,chker='''' ');
|
||||
sql.Add('where MainId=' + quotedstr(trim(Order_Main.fieldbyname('MainId').AsString)));
|
||||
execsql;
|
||||
end;
|
||||
application.MessageBox('坯布采购撤销审核成功!', '提示信息');
|
||||
TBRafresh.Click;
|
||||
except
|
||||
application.MessageBox('坯布采购撤销审核失败!', '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Width = 1366
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
Flat = True
|
||||
|
|
@ -69,16 +69,34 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
ImageIndex = 54
|
||||
OnClick = TBEditClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
object TCK: TToolButton
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = ' '#23457#26680' '
|
||||
ImageIndex = 41
|
||||
Visible = False
|
||||
OnClick = TCKClick
|
||||
end
|
||||
object TnoCK: TToolButton
|
||||
Left = 327
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25764#38144#23457#26680
|
||||
ImageIndex = 129
|
||||
Visible = False
|
||||
OnClick = TnoCKClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 414
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22797#21046
|
||||
ImageIndex = 58
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 315
|
||||
Left = 477
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
|
|
@ -86,7 +104,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
OnClick = TBDelClick
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 378
|
||||
Left = 540
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
|
|
@ -95,7 +113,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
OnClick = TBExportClick
|
||||
end
|
||||
object TBPrint: TToolButton
|
||||
Left = 441
|
||||
Left = 603
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25171#21360
|
||||
|
|
@ -103,14 +121,15 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
OnClick = TBPrintClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 504
|
||||
Left = 666
|
||||
Top = 0
|
||||
Caption = #38468#20214
|
||||
AutoSize = True
|
||||
Caption = ' '#38468#20214' '
|
||||
ImageIndex = 57
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 563
|
||||
Left = 741
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
@ -933,9 +952,9 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
end
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 86
|
||||
Top = 109
|
||||
Width = 1366
|
||||
Height = 629
|
||||
Height = 606
|
||||
Align = alClient
|
||||
TabOrder = 3
|
||||
object Tv1: TcxGridDBTableView
|
||||
|
|
@ -957,8 +976,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsData.Editing = False
|
||||
OptionsSelection.CellSelect = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
Styles.Inactive = DataLink_TradeManage.SHuangSe
|
||||
|
|
@ -968,6 +986,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #32433#32447#36141#38144#21512#21516
|
||||
DataBinding.FieldName = 'ConNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 84
|
||||
end
|
||||
|
|
@ -975,6 +994,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'C_CodeName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 108
|
||||
end
|
||||
|
|
@ -985,6 +1005,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Properties.SaveTime = False
|
||||
Properties.ShowTime = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 82
|
||||
end
|
||||
|
|
@ -992,6 +1013,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #31614#35746#26085#26399
|
||||
DataBinding.FieldName = 'QDTime'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 89
|
||||
end
|
||||
|
|
@ -999,6 +1021,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #20379#24212#21830
|
||||
DataBinding.FieldName = 'FactoryNoName'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 134
|
||||
end
|
||||
|
|
@ -1006,6 +1029,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #35268#26684
|
||||
DataBinding.FieldName = 'C_Spec'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 66
|
||||
end
|
||||
|
|
@ -1014,6 +1038,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
DataBinding.FieldName = 'Qty1'
|
||||
Visible = False
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
VisibleForCustomization = False
|
||||
Width = 46
|
||||
|
|
@ -1022,6 +1047,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #25968#37327
|
||||
DataBinding.FieldName = 'C_Qty'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 58
|
||||
end
|
||||
|
|
@ -1029,6 +1055,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #21333#20301
|
||||
DataBinding.FieldName = 'C_Unit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 47
|
||||
end
|
||||
|
|
@ -1036,6 +1063,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #21333#20215
|
||||
DataBinding.FieldName = 'Price'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 57
|
||||
end
|
||||
|
|
@ -1043,6 +1071,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #24065#31181
|
||||
DataBinding.FieldName = 'PriceUnit'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 61
|
||||
end
|
||||
|
|
@ -1050,6 +1079,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #24635#20215
|
||||
DataBinding.FieldName = 'Money'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 58
|
||||
end
|
||||
|
|
@ -1057,6 +1087,7 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'C_Note'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Styles.Header = DataLink_TradeManage.Default
|
||||
Width = 68
|
||||
end
|
||||
|
|
@ -1064,13 +1095,41 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'XSconNo'
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'Ssel'
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
Width = 60
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 0
|
||||
Top = 86
|
||||
Width = 1366
|
||||
Height = 23
|
||||
Align = alTop
|
||||
TabOrder = 4
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.Style = 9
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
#26410#23457#26680
|
||||
#24050#23457#26680
|
||||
#20840#37096)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectRight = 1366
|
||||
ClientRectTop = 19
|
||||
end
|
||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||
Grid = cxGrid1
|
||||
PopupMenus = <>
|
||||
|
|
@ -1079,7 +1138,8 @@ object frmClothContractListHZ: TfrmClothContractListHZ
|
|||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
Parameters = <>
|
||||
Left = 936
|
||||
Left = 976
|
||||
Top = 80
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user