库存查询调整
This commit is contained in:
parent
7d40dcb34b
commit
5383037be5
|
|
@ -35,6 +35,7 @@ object frmClothTypeSel: TfrmClothTypeSel
|
||||||
OptionsView.CellAutoHeight = True
|
OptionsView.CellAutoHeight = True
|
||||||
OptionsView.Headers = False
|
OptionsView.Headers = False
|
||||||
RootValue = -1
|
RootValue = -1
|
||||||
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnDblClick = cxDBTreeList1DblClick
|
OnDblClick = cxDBTreeList1DblClick
|
||||||
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ uses
|
||||||
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit,
|
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit,
|
||||||
cxInplaceContainer, cxDBTL, cxControls, cxTLData, DB, ADODB, cxLookAndFeels,
|
cxInplaceContainer, cxDBTL, cxControls, cxTLData, DB, ADODB, cxLookAndFeels,
|
||||||
cxLookAndFeelPainters, cxTLdxBarBuiltInMenu,
|
cxLookAndFeelPainters, cxTLdxBarBuiltInMenu,
|
||||||
dxSkinsDefaultPainters;
|
dxSkinsDefaultPainters, dxSkinsCore, cxFilter, dxScrollbarAnnotations;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmClothTypeSel = class(TForm)
|
TfrmClothTypeSel = class(TForm)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ inherited frmClothPurchaseEnterList: TfrmClothPurchaseEnterList
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Height = -16
|
Font.Height = -16
|
||||||
FormStyle = fsMDIChild
|
FormStyle = fsMDIChild
|
||||||
Visible = True
|
|
||||||
ExplicitWidth = 1751
|
ExplicitWidth = 1751
|
||||||
ExplicitHeight = 683
|
ExplicitHeight = 683
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Height = -16
|
Font.Height = -16
|
||||||
FormStyle = fsMDIChild
|
FormStyle = fsMDIChild
|
||||||
Visible = True
|
|
||||||
ExplicitWidth = 1536
|
ExplicitWidth = 1536
|
||||||
ExplicitHeight = 764
|
ExplicitHeight = 764
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
|
|
@ -531,6 +530,9 @@ inherited frmClothScheduleList: TfrmClothScheduleList
|
||||||
object cxTabSheet2: TcxTabSheet
|
object cxTabSheet2: TcxTabSheet
|
||||||
Caption = ' '#37197#24067#25968#25454' '
|
Caption = ' '#37197#24067#25968#25454' '
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
|
ExplicitTop = 0
|
||||||
|
ExplicitWidth = 0
|
||||||
|
ExplicitHeight = 0
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
|
|
@ -891,6 +893,9 @@ inherited frmClothScheduleList: TfrmClothScheduleList
|
||||||
object cxTabSheet1: TcxTabSheet
|
object cxTabSheet1: TcxTabSheet
|
||||||
Caption = ' '#23436#24037#21450#25220#30721#25968#25454' '
|
Caption = ' '#23436#24037#21450#25220#30721#25968#25454' '
|
||||||
ImageIndex = 2
|
ImageIndex = 2
|
||||||
|
ExplicitTop = 0
|
||||||
|
ExplicitWidth = 0
|
||||||
|
ExplicitHeight = 0
|
||||||
object cxGrid4: TcxGrid
|
object cxGrid4: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
|
|
@ -1106,6 +1111,9 @@ inherited frmClothScheduleList: TfrmClothScheduleList
|
||||||
object cxTabSheet4: TcxTabSheet
|
object cxTabSheet4: TcxTabSheet
|
||||||
Caption = #38754#26009#20986#24211
|
Caption = #38754#26009#20986#24211
|
||||||
ImageIndex = 3
|
ImageIndex = 3
|
||||||
|
ExplicitTop = 0
|
||||||
|
ExplicitWidth = 0
|
||||||
|
ExplicitHeight = 0
|
||||||
object cxGrid5: TcxGrid
|
object cxGrid5: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
|
|
@ -1300,6 +1308,9 @@ inherited frmClothScheduleList: TfrmClothScheduleList
|
||||||
object cxTabSheet5: TcxTabSheet
|
object cxTabSheet5: TcxTabSheet
|
||||||
Caption = #29983#20135#22791#27880
|
Caption = #29983#20135#22791#27880
|
||||||
ImageIndex = 4
|
ImageIndex = 4
|
||||||
|
ExplicitTop = 0
|
||||||
|
ExplicitWidth = 0
|
||||||
|
ExplicitHeight = 0
|
||||||
object cxGrid6: TcxGrid
|
object cxGrid6: TcxGrid
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 0
|
Left = 0
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ inherited frmItemizedListList: TfrmItemizedListList
|
||||||
Font.Height = -16
|
Font.Height = -16
|
||||||
FormStyle = fsMDIChild
|
FormStyle = fsMDIChild
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
Visible = True
|
|
||||||
ExplicitWidth = 1789
|
ExplicitWidth = 1789
|
||||||
ExplicitHeight = 775
|
ExplicitHeight = 775
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Height = -16
|
Font.Height = -16
|
||||||
FormStyle = fsMDIChild
|
FormStyle = fsMDIChild
|
||||||
Visible = True
|
|
||||||
ExplicitWidth = 1556
|
ExplicitWidth = 1556
|
||||||
ExplicitHeight = 593
|
ExplicitHeight = 593
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
|
|
|
||||||
|
|
@ -860,6 +860,12 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
inherited loadProcess: TPanel
|
||||||
|
Left = 888
|
||||||
|
Top = 296
|
||||||
|
ExplicitLeft = 888
|
||||||
|
ExplicitTop = 296
|
||||||
|
end
|
||||||
inherited cxProgressBar2: TcxProgressBar
|
inherited cxProgressBar2: TcxProgressBar
|
||||||
Left = 721
|
Left = 721
|
||||||
Top = 398
|
Top = 398
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ inherited frmTradeClothTotalStkList: TfrmTradeClothTotalStkList
|
||||||
Font.Height = -16
|
Font.Height = -16
|
||||||
FormStyle = fsMDIChild
|
FormStyle = fsMDIChild
|
||||||
Position = poDefault
|
Position = poDefault
|
||||||
Visible = True
|
|
||||||
ExplicitWidth = 1420
|
ExplicitWidth = 1420
|
||||||
ExplicitHeight = 554
|
ExplicitHeight = 554
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
|
|
@ -89,28 +88,28 @@ inherited frmTradeClothTotalStkList: TfrmTradeClothTotalStkList
|
||||||
ParentColor = True
|
ParentColor = True
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 50
|
Left = 28
|
||||||
Top = 18
|
Top = 18
|
||||||
Width = 32
|
Width = 32
|
||||||
Height = 21
|
Height = 21
|
||||||
Caption = #21697#21517
|
Caption = #21697#21517
|
||||||
end
|
end
|
||||||
object Label4: TLabel
|
object Label4: TLabel
|
||||||
Left = 651
|
Left = 598
|
||||||
Top = 18
|
Top = 18
|
||||||
Width = 64
|
Width = 64
|
||||||
Height = 21
|
Height = 21
|
||||||
Caption = #26469#33258#21333#20301
|
Caption = #26469#33258#21333#20301
|
||||||
end
|
end
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 441
|
Left = 408
|
||||||
Top = 18
|
Top = 18
|
||||||
Width = 32
|
Width = 32
|
||||||
Height = 21
|
Height = 21
|
||||||
Caption = #39068#33394
|
Caption = #39068#33394
|
||||||
end
|
end
|
||||||
object Label6: TLabel
|
object Label6: TLabel
|
||||||
Left = 240
|
Left = 218
|
||||||
Top = 18
|
Top = 18
|
||||||
Width = 32
|
Width = 32
|
||||||
Height = 21
|
Height = 21
|
||||||
|
|
@ -118,7 +117,7 @@ inherited frmTradeClothTotalStkList: TfrmTradeClothTotalStkList
|
||||||
end
|
end
|
||||||
object C_name: TcxTextEdit
|
object C_name: TcxTextEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 86
|
Left = 64
|
||||||
Top = 14
|
Top = 14
|
||||||
Properties.OnChange = FromCoNamePropertiesChange
|
Properties.OnChange = FromCoNamePropertiesChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
|
@ -127,7 +126,7 @@ inherited frmTradeClothTotalStkList: TfrmTradeClothTotalStkList
|
||||||
end
|
end
|
||||||
object FromCoName: TcxTextEdit
|
object FromCoName: TcxTextEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 719
|
Left = 666
|
||||||
Top = 14
|
Top = 14
|
||||||
Properties.OnChange = FromCoNamePropertiesChange
|
Properties.OnChange = FromCoNamePropertiesChange
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
|
@ -136,7 +135,7 @@ inherited frmTradeClothTotalStkList: TfrmTradeClothTotalStkList
|
||||||
end
|
end
|
||||||
object C_Color: TcxTextEdit
|
object C_Color: TcxTextEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 477
|
Left = 444
|
||||||
Top = 14
|
Top = 14
|
||||||
Properties.OnChange = FromCoNamePropertiesChange
|
Properties.OnChange = FromCoNamePropertiesChange
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
|
@ -145,7 +144,7 @@ inherited frmTradeClothTotalStkList: TfrmTradeClothTotalStkList
|
||||||
end
|
end
|
||||||
object C_ColorNo: TcxTextEdit
|
object C_ColorNo: TcxTextEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 276
|
Left = 254
|
||||||
Top = 14
|
Top = 14
|
||||||
Properties.OnChange = FromCoNamePropertiesChange
|
Properties.OnChange = FromCoNamePropertiesChange
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
|
@ -170,6 +169,7 @@ inherited frmTradeClothTotalStkList: TfrmTradeClothTotalStkList
|
||||||
Properties.ActivePage = cxTabSheet1
|
Properties.ActivePage = cxTabSheet1
|
||||||
Properties.CustomButtons.Buttons = <>
|
Properties.CustomButtons.Buttons = <>
|
||||||
Properties.Style = 5
|
Properties.Style = 5
|
||||||
|
OnChange = cxPageControl1Change
|
||||||
ClientRectBottom = 426
|
ClientRectBottom = 426
|
||||||
ClientRectRight = 1404
|
ClientRectRight = 1404
|
||||||
ClientRectTop = 32
|
ClientRectTop = 32
|
||||||
|
|
@ -328,9 +328,6 @@ inherited frmTradeClothTotalStkList: TfrmTradeClothTotalStkList
|
||||||
object cxTabSheet2: TcxTabSheet
|
object cxTabSheet2: TcxTabSheet
|
||||||
Caption = #20135#21697#26126#32454
|
Caption = #20135#21697#26126#32454
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
ExplicitTop = 0
|
|
||||||
ExplicitWidth = 0
|
|
||||||
ExplicitHeight = 211
|
|
||||||
object cxGrid1: TcxGrid
|
object cxGrid1: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
|
|
@ -339,8 +336,6 @@ inherited frmTradeClothTotalStkList: TfrmTradeClothTotalStkList
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitLeft = -464
|
|
||||||
ExplicitTop = -26
|
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,7 @@ type
|
||||||
procedure FromCoNameKeyPress(Sender: TObject; var Key: Char);
|
procedure FromCoNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure ToolButton3Click(Sender: TObject);
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
procedure TV2DblClick(Sender: TObject);
|
procedure TV2DblClick(Sender: TObject);
|
||||||
|
procedure cxPageControl1Change(Sender: TObject);
|
||||||
private
|
private
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
procedure InitGrid1();
|
procedure InitGrid1();
|
||||||
|
|
@ -152,6 +153,17 @@ begin
|
||||||
frmTradeClothTotalStkList := nil;
|
frmTradeClothTotalStkList := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmTradeClothTotalStkList.cxPageControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
case cxPageControl1.ActivePageIndex of
|
||||||
|
1:
|
||||||
|
begin
|
||||||
|
InitGrid1();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeClothTotalStkList.FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure TfrmTradeClothTotalStkList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
@ -201,6 +213,7 @@ begin
|
||||||
|
|
||||||
SqlStr := SqlStr + ' group by C_Code,C_Name,C_Color,C_ColorNo,C_Degree,C_Pattern,QtyUnit';
|
SqlStr := SqlStr + ' group by C_Code,C_Name,C_Color,C_ColorNo,C_Degree,C_Pattern,QtyUnit';
|
||||||
|
|
||||||
|
// ShowMessage(SqlStr);
|
||||||
InitCDSData(ADO_2, CDS_2, Tv2, SqlStr, SGetFilters(Panel1, 1, 2), 'C_Code');
|
InitCDSData(ADO_2, CDS_2, Tv2, SqlStr, SGetFilters(Panel1, 1, 2), 'C_Code');
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
@ -244,15 +257,17 @@ end;
|
||||||
procedure TfrmTradeClothTotalStkList.FormShow(Sender: TObject);
|
procedure TfrmTradeClothTotalStkList.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ReadCxGrid(trim(Self.Caption), Tv1, 'óÒ×»ã×ֿܲâ');
|
|
||||||
|
ReadCxGrid(trim(Self.Caption) + 'Tv1', Tv1, 'óÒ×»ã×ֿܲâ');
|
||||||
|
ReadCxGrid(trim(Self.Caption) + 'Tv2', Tv2, 'óÒ×»ã×ֿܲâ');
|
||||||
canshu4 := Trim(self.fParameters4);
|
canshu4 := Trim(self.fParameters4);
|
||||||
InitGrid();
|
InitGrid2();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeClothTotalStkList.FromCoNameKeyPress(Sender: TObject; var Key: Char);
|
procedure TfrmTradeClothTotalStkList.FromCoNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
begin
|
begin
|
||||||
if Key = #13 then
|
if Key = #13 then
|
||||||
InitGrid();
|
TBFind.Click;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeClothTotalStkList.FromCoNamePropertiesChange(Sender: TObject);
|
procedure TfrmTradeClothTotalStkList.FromCoNamePropertiesChange(Sender: TObject);
|
||||||
|
|
@ -296,7 +311,8 @@ end;
|
||||||
|
|
||||||
procedure TfrmTradeClothTotalStkList.ToolButton2Click(Sender: TObject);
|
procedure TfrmTradeClothTotalStkList.ToolButton2Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
WriteCxGrid(trim(Self.Caption), Tv1, 'óÒ×»ã×ֿܲâ');
|
WriteCxGrid(trim(Self.Caption) + 'Tv1', Tv1, 'óÒ×»ã×ֿܲâ');
|
||||||
|
WriteCxGrid(trim(Self.Caption) + 'Tv2', Tv2, 'óÒ×»ã×ֿܲâ');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeClothTotalStkList.ToolButton3Click(Sender: TObject);
|
procedure TfrmTradeClothTotalStkList.ToolButton3Click(Sender: TObject);
|
||||||
|
|
@ -330,7 +346,7 @@ end;
|
||||||
procedure TfrmTradeClothTotalStkList.TV2DblClick(Sender: TObject);
|
procedure TfrmTradeClothTotalStkList.TV2DblClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
cxPageControl1.ActivePageIndex := 1;
|
cxPageControl1.ActivePageIndex := 1;
|
||||||
InitGrid1();
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ inherited frmTradeDeliveryRequest: TfrmTradeDeliveryRequest
|
||||||
Font.Height = -16
|
Font.Height = -16
|
||||||
FormStyle = fsMDIChild
|
FormStyle = fsMDIChild
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
Visible = True
|
|
||||||
ExplicitWidth = 1595
|
ExplicitWidth = 1595
|
||||||
ExplicitHeight = 780
|
ExplicitHeight = 780
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -13,7 +13,7 @@ uses
|
||||||
RM_System, RM_GridReport, Menus, cxCalendar, cxButtonEdit, cxTextEdit,
|
RM_System, RM_GridReport, Menus, cxCalendar, cxButtonEdit, cxTextEdit,
|
||||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxDateRanges,
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxDateRanges,
|
||||||
dxBarBuiltInMenu, U_BaseHelp, System.ImageList, Vcl.ImgList,
|
dxBarBuiltInMenu, U_BaseHelp, System.ImageList, Vcl.ImgList,
|
||||||
dxScrollbarAnnotations, cxContainer, dxSkinsCore, dxSkinsDefaultPainters;
|
dxScrollbarAnnotations, cxContainer, dxSkinsCore, dxSkinsDefaultPainters, cxPC;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmTradeTotallClothStkSel = class(TfrmBaseHelp)
|
TfrmTradeTotallClothStkSel = class(TfrmBaseHelp)
|
||||||
|
|
@ -23,7 +23,7 @@ type
|
||||||
TBClose: TToolButton;
|
TBClose: TToolButton;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
ADOQueryCmd: TADOQuery;
|
ADOQueryCmd: TADOQuery;
|
||||||
ADOQueryMain: TADOQuery;
|
ADO_1: TADOQuery;
|
||||||
ADOQueryTemp: TADOQuery;
|
ADOQueryTemp: TADOQuery;
|
||||||
PopupMenu1: TPopupMenu;
|
PopupMenu1: TPopupMenu;
|
||||||
N1: TMenuItem;
|
N1: TMenuItem;
|
||||||
|
|
@ -32,39 +32,44 @@ type
|
||||||
ToolButton2: TToolButton;
|
ToolButton2: TToolButton;
|
||||||
Label3: TLabel;
|
Label3: TLabel;
|
||||||
Label4: TLabel;
|
Label4: TLabel;
|
||||||
Label8: TLabel;
|
|
||||||
Label2: TLabel;
|
|
||||||
Label1: TLabel;
|
|
||||||
Label5: TLabel;
|
|
||||||
C_name: TcxTextEdit;
|
C_name: TcxTextEdit;
|
||||||
FromCoName: TcxTextEdit;
|
FromCoName: TcxTextEdit;
|
||||||
C_spec: TcxTextEdit;
|
GPM_1: TcxGridPopupMenu;
|
||||||
BatchNo: TcxTextEdit;
|
CDS_1: TClientDataSet;
|
||||||
GC_Name: TcxTextEdit;
|
DS_1: TDataSource;
|
||||||
CraftCode: TcxTextEdit;
|
cxPageControl1: TcxPageControl;
|
||||||
Label6: TLabel;
|
cxTabSheet1: TcxTabSheet;
|
||||||
Label7: TLabel;
|
cxGrid2: TcxGrid;
|
||||||
FtyPCId: TcxTextEdit;
|
TV2: TcxGridDBTableView;
|
||||||
FromConNo: TcxTextEdit;
|
cxGridDBColumn14: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn9: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn15: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn16: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn24: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn26: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn28: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn29: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn17: TcxGridDBColumn;
|
||||||
|
cxGridLevel1: TcxGridLevel;
|
||||||
|
cxTabSheet2: TcxTabSheet;
|
||||||
cxGrid1: TcxGrid;
|
cxGrid1: TcxGrid;
|
||||||
Tv1: TcxGridDBTableView;
|
Tv1: TcxGridDBTableView;
|
||||||
|
Tv1Column33: TcxGridDBColumn;
|
||||||
Tv1Column13: TcxGridDBColumn;
|
Tv1Column13: TcxGridDBColumn;
|
||||||
v1Column6: TcxGridDBColumn;
|
v1Column6: TcxGridDBColumn;
|
||||||
v1Column2: TcxGridDBColumn;
|
v1Column2: TcxGridDBColumn;
|
||||||
v1Column4: TcxGridDBColumn;
|
v1Column4: TcxGridDBColumn;
|
||||||
v1Column14: TcxGridDBColumn;
|
v1Column14: TcxGridDBColumn;
|
||||||
Tv1Column11: TcxGridDBColumn;
|
Tv1Column11: TcxGridDBColumn;
|
||||||
Tv1Column20: TcxGridDBColumn;
|
Tv1Column6: TcxGridDBColumn;
|
||||||
v2Column1: TcxGridDBColumn;
|
v2Column1: TcxGridDBColumn;
|
||||||
v1Column8: TcxGridDBColumn;
|
v1Column8: TcxGridDBColumn;
|
||||||
Tv1Column4: TcxGridDBColumn;
|
Tv1Column4: TcxGridDBColumn;
|
||||||
v1Column13: TcxGridDBColumn;
|
v1Column13: TcxGridDBColumn;
|
||||||
v1Column11: TcxGridDBColumn;
|
v1Column11: TcxGridDBColumn;
|
||||||
Tv1Column6: TcxGridDBColumn;
|
|
||||||
v1Column15: TcxGridDBColumn;
|
v1Column15: TcxGridDBColumn;
|
||||||
v2Column6: TcxGridDBColumn;
|
v2Column6: TcxGridDBColumn;
|
||||||
v1Column3: TcxGridDBColumn;
|
v1Column3: TcxGridDBColumn;
|
||||||
v1Column5: TcxGridDBColumn;
|
|
||||||
Tv1Column19: TcxGridDBColumn;
|
Tv1Column19: TcxGridDBColumn;
|
||||||
v1Column19: TcxGridDBColumn;
|
v1Column19: TcxGridDBColumn;
|
||||||
v1Column12: TcxGridDBColumn;
|
v1Column12: TcxGridDBColumn;
|
||||||
|
|
@ -80,7 +85,6 @@ type
|
||||||
Tv1Column9: TcxGridDBColumn;
|
Tv1Column9: TcxGridDBColumn;
|
||||||
Tv1Column12: TcxGridDBColumn;
|
Tv1Column12: TcxGridDBColumn;
|
||||||
Tv1Column27: TcxGridDBColumn;
|
Tv1Column27: TcxGridDBColumn;
|
||||||
Tv1Column14: TcxGridDBColumn;
|
|
||||||
Tv1Column15: TcxGridDBColumn;
|
Tv1Column15: TcxGridDBColumn;
|
||||||
Tv1Column16: TcxGridDBColumn;
|
Tv1Column16: TcxGridDBColumn;
|
||||||
Tv1Column17: TcxGridDBColumn;
|
Tv1Column17: TcxGridDBColumn;
|
||||||
|
|
@ -88,26 +92,25 @@ type
|
||||||
Tv1Column22: TcxGridDBColumn;
|
Tv1Column22: TcxGridDBColumn;
|
||||||
Tv1Column25: TcxGridDBColumn;
|
Tv1Column25: TcxGridDBColumn;
|
||||||
Tv1Column28: TcxGridDBColumn;
|
Tv1Column28: TcxGridDBColumn;
|
||||||
Tv1Column24: TcxGridDBColumn;
|
|
||||||
Tv1Column26: TcxGridDBColumn;
|
|
||||||
Tv1Column23: TcxGridDBColumn;
|
|
||||||
Tv1Column29: TcxGridDBColumn;
|
Tv1Column29: TcxGridDBColumn;
|
||||||
Tv1Column30: TcxGridDBColumn;
|
Tv1Column30: TcxGridDBColumn;
|
||||||
Tv1Column31: TcxGridDBColumn;
|
Tv1Column31: TcxGridDBColumn;
|
||||||
Tv1Column32: TcxGridDBColumn;
|
Tv1Column32: TcxGridDBColumn;
|
||||||
cxGrid1Level1: TcxGridLevel;
|
|
||||||
GPM_1: TcxGridPopupMenu;
|
|
||||||
CDS_1: TClientDataSet;
|
|
||||||
DS_1: TDataSource;
|
|
||||||
Tv1Column33: TcxGridDBColumn;
|
|
||||||
Tv1Column34: TcxGridDBColumn;
|
|
||||||
Tv1Column35: TcxGridDBColumn;
|
|
||||||
Tv1Column36: TcxGridDBColumn;
|
Tv1Column36: TcxGridDBColumn;
|
||||||
Tv1Column37: TcxGridDBColumn;
|
Tv1Column39: TcxGridDBColumn;
|
||||||
|
Tv1Column40: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
|
GPM_2: TcxGridPopupMenu;
|
||||||
|
CDS_2: TClientDataSet;
|
||||||
|
DS_2: TDataSource;
|
||||||
|
ADO_2: TADOQuery;
|
||||||
|
Label5: TLabel;
|
||||||
|
Label6: TLabel;
|
||||||
|
C_Color: TcxTextEdit;
|
||||||
|
C_ColorNo: TcxTextEdit;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure TBRafreshClick(Sender: TObject);
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
procedure ConNoMChange(Sender: TObject);
|
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure TBFindClick(Sender: TObject);
|
procedure TBFindClick(Sender: TObject);
|
||||||
|
|
@ -117,9 +120,12 @@ type
|
||||||
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 ToolButton2Click(Sender: TObject);
|
procedure ToolButton2Click(Sender: TObject);
|
||||||
procedure FromCoNameKeyPress(Sender: TObject; var Key: Char);
|
procedure FromCoNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure FromCoNamePropertiesChange(Sender: TObject);
|
procedure TV2DblClick(Sender: TObject);
|
||||||
|
procedure cxPageControl1Change(Sender: TObject);
|
||||||
private
|
private
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
|
procedure InitGrid1();
|
||||||
|
procedure InitGrid2();
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
public
|
public
|
||||||
FstkName, FC_Degree, FStkIdS: string;
|
FstkName, FC_Degree, FStkIdS: string;
|
||||||
|
|
@ -142,6 +148,16 @@ begin
|
||||||
frmTradeTotallClothStkSel := nil;
|
frmTradeTotallClothStkSel := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmTradeTotallClothStkSel.cxPageControl1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
case cxPageControl1.ActivePageIndex of
|
||||||
|
1:
|
||||||
|
begin
|
||||||
|
InitGrid1();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeTotallClothStkSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure TfrmTradeTotallClothStkSel.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
@ -149,42 +165,77 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeTotallClothStkSel.InitGrid();
|
procedure TfrmTradeTotallClothStkSel.InitGrid();
|
||||||
|
begin
|
||||||
|
case cxPageControl1.ActivePageIndex of
|
||||||
|
0:
|
||||||
|
begin
|
||||||
|
InitGrid2();
|
||||||
|
end;
|
||||||
|
1:
|
||||||
|
begin
|
||||||
|
|
||||||
|
InitGrid1();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmTradeTotallClothStkSel.InitGrid1();
|
||||||
var
|
var
|
||||||
SqlStr: string;
|
SqlStr, WSqlStr: string;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
SqlStr := ' select A.*,StkPieceint=CEILING(A.StkPiece),B.BuyRepresentative,B.BuyAddress,B.BuyTel ';
|
SqlStr := ' select A.*,StkPieceint=CEILING(A.StkPiece) ';
|
||||||
SqlStr := SqlStr + ' from BS_Cloth_IO A left join Bs_Contract_Main B on A.FROMConMId=B.ConMId ';
|
SqlStr := SqlStr + ' from BS_Cloth_IO A ';
|
||||||
SqlStr := SqlStr + ' where A.IOFlag=''Èë¿â'' and (isnull(StkQty,0)>0 or isnull(StkPiece,0)>0) ';
|
SqlStr := SqlStr + ' where A.IOFlag=''Èë¿â'' and (isnull(StkQty,0)>0 or isnull(StkPiece,0)>0) ';
|
||||||
// SqlStr := SqlStr + ' and isnull(stkName,'''')=''' + Trim(FstkName) + '''';
|
SqlStr := SqlStr + ' and isnull(stkName,'''')=''' + Trim(FstkName) + '''';
|
||||||
|
|
||||||
if Trim(FStkIdS) <> '' then
|
if Trim(FStkIdS) <> '' then
|
||||||
SqlStr := SqlStr + ' and not EXISTS (select SP.RTValue from [dbo].[F_Tool_SplitString](' + Quotedstr(FStkIdS) + ','','') SP where SP.RTValue=A.BCIOID ) ';
|
SqlStr := SqlStr + ' and not EXISTS (select SP.RTValue from [dbo].[F_Tool_SplitString](' + Quotedstr(FStkIdS) + ','','') SP where SP.RTValue=A.BCIOID ) ';
|
||||||
|
|
||||||
if FC_Degree <> '' then
|
if FC_Degree <> '' then
|
||||||
SqlStr := SqlStr + ' and isnull(C_Degree,'''')=''' + Trim(FC_Degree) + '''';
|
SqlStr := SqlStr + ' and isnull(C_Degree,'''')=''' + Trim(FC_Degree) + '''';
|
||||||
|
|
||||||
|
WSqlStr := CommonFiltersByTv(Tv2, '{"RemovalNull":true,"Fields":"C_Code|C_Name|C_Color|C_ColorNo|C_Pattern|C_Degree|QtyUnit"}');
|
||||||
|
if TRIM(WSqlStr) <> '' then
|
||||||
|
SqlStr := SqlStr + ' and ' + WSqlStr;
|
||||||
|
|
||||||
SqlStr := SqlStr + ' order by IOTime desc';
|
SqlStr := SqlStr + ' order by IOTime desc';
|
||||||
|
|
||||||
InitCDSData(ADOQueryMain, CDS_1, Tv1, SqlStr, SGetFilters(Panel1, 1, 2), 'BCIOID');
|
InitCDSData(ADO_1, CDS_1, Tv1, SqlStr, SGetFilters(Panel1, 1, 2), 'BCIOID');
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmTradeTotallClothStkSel.InitGrid2();
|
||||||
|
var
|
||||||
|
SqlStr, WSqlStr: string;
|
||||||
|
begin
|
||||||
|
|
||||||
|
SqlStr := ' select A.C_Code,C_Name,C_Color,C_ColorNo,C_Degree,C_Pattern,QtyUnit,StkPieceint=sum(CEILING(A.StkPiece)),StkQty=sum(StkQty),QtyUnit ';
|
||||||
|
SqlStr := SqlStr + ' from BS_Cloth_IO A ';
|
||||||
|
SqlStr := SqlStr + ' where A.IOFlag=''Èë¿â'' and (isnull(StkQty,0)>0 or isnull(StkPiece,0)>0) ';
|
||||||
|
SqlStr := SqlStr + ' and isnull(stkName,'''')=''' + Trim(FstkName) + '''';
|
||||||
|
|
||||||
|
if Trim(FStkIdS) <> '' then
|
||||||
|
SqlStr := SqlStr + ' and not EXISTS (select SP.RTValue from [dbo].[F_Tool_SplitString](' + Quotedstr(FStkIdS) + ','','') SP where SP.RTValue=A.BCIOID ) ';
|
||||||
|
|
||||||
|
if FC_Degree <> '' then
|
||||||
|
SqlStr := SqlStr + ' and isnull(C_Degree,'''')=''' + Trim(FC_Degree) + '''';
|
||||||
|
|
||||||
|
SqlStr := SqlStr + ' group by C_Code,C_Name,C_Color,C_ColorNo,C_Degree,C_Pattern,QtyUnit';
|
||||||
|
|
||||||
|
// ShowMessage(SqlStr);
|
||||||
|
InitCDSData(ADO_2, CDS_2, Tv2, SqlStr, SGetFilters(Panel1, 1, 2), 'C_Code');
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeTotallClothStkSel.TBRafreshClick(Sender: TObject);
|
procedure TfrmTradeTotallClothStkSel.TBRafreshClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
InitGrid();
|
InitGrid2();
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmTradeTotallClothStkSel.ConNoMChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if ADOQueryMain.Active then
|
|
||||||
begin
|
|
||||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeTotallClothStkSel.TBCloseClick(Sender: TObject);
|
procedure TfrmTradeTotallClothStkSel.TBCloseClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
|
||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -192,31 +243,28 @@ procedure TfrmTradeTotallClothStkSel.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
ReadCxGrid(trim(self.Caption), Tv1, 'óÒ×»ã×ֿܲâ');
|
ReadCxGrid(trim(self.Caption), Tv1, 'óÒ×»ã×ֿܲâ');
|
||||||
InitGrid();
|
InitGrid2();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeTotallClothStkSel.FromCoNameKeyPress(Sender: TObject; var Key: Char);
|
procedure TfrmTradeTotallClothStkSel.FromCoNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
begin
|
begin
|
||||||
if Key = #13 then
|
if Key = #13 then
|
||||||
begin
|
begin
|
||||||
InitGrid();
|
TBFind.Click;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTradeTotallClothStkSel.FromCoNamePropertiesChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if Length(Trim(TcxTextEdit(Sender).Text)) < 4 then
|
|
||||||
Exit;
|
|
||||||
TBFind.Click;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmTradeTotallClothStkSel.TBFindClick(Sender: TObject);
|
procedure TfrmTradeTotallClothStkSel.TBFindClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if ADOQueryMain.Active then
|
case cxPageControl1.ActivePageIndex of
|
||||||
begin
|
0:
|
||||||
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
|
begin
|
||||||
SCreateCDS(ADOQueryMain, CDS_1);
|
CDSDataFilter(ADO_2, CDS_2, Tv2, '{"FilterStr":"' + CommonFiltersByContainer(Panel1, ' {"EquTag": 1,"LikeTag": 2,"Fields": "C_name|C_Color|C_ColorNo"}') + '" }');
|
||||||
SInitCDSData(ADOQueryMain, CDS_1);
|
end;
|
||||||
|
1:
|
||||||
|
begin
|
||||||
|
CDSDataFilter(ADO_1, CDS_1, Tv1, '{"FilterStr":"' + CommonFiltersByContainer(Panel1, ' {"EquTag": 1,"LikeTag": 2,"Fields": ""}') + '" }');
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -252,5 +300,11 @@ begin
|
||||||
ModalResult := 1;
|
ModalResult := 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmTradeTotallClothStkSel.TV2DblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cxPageControl1.ActivePageIndex := 1;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,9 @@ inherited frmTradeDispatchedList: TfrmTradeDispatchedList
|
||||||
Width = 1536
|
Width = 1536
|
||||||
Height = 37
|
Height = 37
|
||||||
Align = alTop
|
Align = alTop
|
||||||
|
Color = clWhite
|
||||||
ParentBackground = False
|
ParentBackground = False
|
||||||
|
ParentColor = False
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
ExplicitLeft = 2
|
ExplicitLeft = 2
|
||||||
ExplicitTop = 2
|
ExplicitTop = 2
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,8 @@ uses
|
||||||
IdFTP, ShellAPI, cxDropDownEdit, cxCheckBox, RM_e_Graphic, RM_e_Jpeg,
|
IdFTP, ShellAPI, cxDropDownEdit, cxCheckBox, RM_e_Graphic, RM_e_Jpeg,
|
||||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, Math,
|
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, Math,
|
||||||
dxDateRanges, IdExplicitTLSClientServerBase, U_BaseList, Vcl.Clipbrd,
|
dxDateRanges, IdExplicitTLSClientServerBase, U_BaseList, Vcl.Clipbrd,
|
||||||
dxScrollbarAnnotations, cxProgressBar, FrameDateSel;
|
dxScrollbarAnnotations, cxProgressBar, FrameDateSel, dxSkinsCore,
|
||||||
|
dxSkinsDefaultPainters;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmTradeDispatchedList = class(TfrmBaseList)
|
TfrmTradeDispatchedList = class(TfrmBaseList)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user