This commit is contained in:
ddf 2025-03-20 16:38:30 +08:00
parent d5749c5bc9
commit 712a737739
46 changed files with 20977 additions and 704 deletions

View File

@ -2,22 +2,22 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 372
Top = 106
Caption = #20135#21697#20449#24687#36873#25321
ClientHeight = 813
ClientWidth = 1807
ClientHeight = 541
ClientWidth = 1719
Font.Charset = GB2312_CHARSET
Font.Height = -16
Font.Name = #24494#36719#38597#40657
Position = poScreenCenter
OnClose = FormClose
ExplicitWidth = 1823
ExplicitHeight = 852
ExplicitWidth = 1727
ExplicitHeight = 572
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1807
Width = 1719
Height = 30
AutoSize = True
ButtonHeight = 30
@ -57,7 +57,7 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 0
Top = 119
Width = 216
Height = 694
Height = 422
Align = alLeft
Bands = <
item
@ -88,8 +88,8 @@ inherited frmClothInfoSel: TfrmClothInfoSel
object Panel3: TPanel [2]
Left = 216
Top = 119
Width = 1591
Height = 694
Width = 1503
Height = 422
Align = alClient
BevelInner = bvRaised
BevelOuter = bvLowered
@ -98,7 +98,7 @@ inherited frmClothInfoSel: TfrmClothInfoSel
object Panel7: TPanel
Left = 2
Top = 2
Width = 1587
Width = 1499
Height = 40
Align = alTop
BevelOuter = bvNone
@ -106,14 +106,14 @@ inherited frmClothInfoSel: TfrmClothInfoSel
object Panel4: TPanel
Left = 0
Top = 0
Width = 1587
Width = 1499
Height = 40
Align = alClient
AutoSize = True
ParentColor = True
TabOrder = 0
DesignSize = (
1587
1499
40)
object Label14: TLabel
Left = 19
@ -202,8 +202,8 @@ inherited frmClothInfoSel: TfrmClothInfoSel
object cxGrid1: TcxGrid
Left = 2
Top = 42
Width = 919
Height = 650
Width = 831
Height = 378
Align = alClient
TabOrder = 1
object Tv1: TcxGridDBTableView
@ -446,6 +446,14 @@ inherited frmClothInfoSel: TfrmClothInfoSel
HeaderAlignmentHorz = taCenter
Width = 66
end
object Tv1Column24: TcxGridDBColumn
Caption = #21333#20301
DataBinding.FieldName = 'qtyunit'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 74
end
object Tv1Column21: TcxGridDBColumn
Caption = #23454#27979#27700#21387
DataBinding.FieldName = 'Test_WaterPressure'
@ -459,10 +467,10 @@ inherited frmClothInfoSel: TfrmClothInfoSel
end
end
object GroupBox1: TGroupBox
Left = 1272
Left = 1184
Top = 42
Width = 317
Height = 650
Height = 378
Align = alRight
Caption = #20505#36873#21462
Color = clWhite
@ -474,7 +482,7 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 2
Top = 23
Width = 313
Height = 625
Height = 353
Align = alClient
TabOrder = 0
object TV2: TcxGridDBTableView
@ -533,10 +541,10 @@ inherited frmClothInfoSel: TfrmClothInfoSel
end
end
object cxGrid3: TcxGrid
Left = 921
Left = 833
Top = 42
Width = 351
Height = 650
Height = 378
Align = alRight
TabOrder = 3
object TV3: TcxGridDBTableView
@ -609,7 +617,7 @@ inherited frmClothInfoSel: TfrmClothInfoSel
object Panel1: TPanel [3]
Left = 0
Top = 30
Width = 1807
Width = 1719
Height = 89
Align = alTop
BevelInner = bvRaised
@ -622,6 +630,8 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Width = 64
Height = 21
Caption = #20135#21697#32534#21495
Color = clBtnFace
ParentColor = False
end
object Label4: TLabel
Left = 1010
@ -629,6 +639,8 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Width = 64
Height = 21
Caption = #33394#24067#21517#31216
Color = clBtnFace
ParentColor = False
end
object Label9: TLabel
Left = 535
@ -636,6 +648,8 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Width = 32
Height = 21
Caption = #20811#37325
Color = clBtnFace
ParentColor = False
end
object Label8: TLabel
Left = 301
@ -643,6 +657,8 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Width = 64
Height = 21
Caption = #20013#25991#25104#20221
Color = clBtnFace
ParentColor = False
end
object Label1: TLabel
Left = 47
@ -650,6 +666,8 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Width = 32
Height = 21
Caption = #24067#31181
Color = clBtnFace
ParentColor = False
end
object Label2: TLabel
Left = 47
@ -657,6 +675,8 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Width = 48
Height = 21
Caption = #21152#24037#21035
Color = clBtnFace
ParentColor = False
end
object Label5: TLabel
Left = 536
@ -664,6 +684,8 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Width = 32
Height = 21
Caption = #35268#26684
Color = clBtnFace
ParentColor = False
end
object Label6: TLabel
Left = 300
@ -671,6 +693,8 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Width = 64
Height = 21
Caption = #33521#25991#25104#20998
Color = clBtnFace
ParentColor = False
end
object Label7: TLabel
Left = 754
@ -678,6 +702,8 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Width = 80
Height = 21
Caption = #21518#25972#29702#33521#25991
Color = clBtnFace
ParentColor = False
end
object Label10: TLabel
Left = 754
@ -685,12 +711,13 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Width = 80
Height = 21
Caption = #21518#25972#29702#20013#25991
Color = clBtnFace
ParentColor = False
end
object C_Code: TcxTextEdit
Tag = 1
Left = 1078
Top = 47
ParentColor = True
TabOrder = 0
OnKeyPress = GC_NameKeyPress
Width = 150
@ -699,7 +726,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Tag = 2
Left = 1078
Top = 7
ParentColor = True
TabOrder = 1
OnKeyPress = GC_NameKeyPress
Width = 150
@ -708,7 +734,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Tag = 2
Left = 571
Top = 47
ParentColor = True
TabOrder = 2
OnKeyPress = GC_NameKeyPress
Width = 150
@ -717,7 +742,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Tag = 2
Left = 371
Top = 47
ParentColor = True
TabOrder = 3
OnKeyPress = GC_NameKeyPress
Width = 150
@ -726,7 +750,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Tag = 2
Left = 115
Top = 7
ParentColor = True
TabOrder = 4
OnKeyPress = GC_NameKeyPress
Width = 150
@ -735,7 +758,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Tag = 2
Left = 115
Top = 47
ParentColor = True
TabOrder = 5
OnKeyPress = GC_NameKeyPress
Width = 150
@ -744,7 +766,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Tag = 2
Left = 574
Top = 7
ParentColor = True
TabOrder = 6
OnKeyPress = GC_NameKeyPress
Width = 150
@ -753,7 +774,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Tag = 2
Left = 371
Top = 7
ParentColor = True
TabOrder = 7
OnKeyPress = GC_NameKeyPress
Width = 150
@ -762,7 +782,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Tag = 2
Left = 840
Top = 47
ParentColor = True
TabOrder = 8
OnKeyPress = GC_NameKeyPress
Width = 150
@ -771,7 +790,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Tag = 2
Left = 840
Top = 7
ParentColor = True
TabOrder = 9
OnKeyPress = GC_NameKeyPress
Width = 150

View File

@ -12,7 +12,7 @@ uses
cxLookAndFeelPainters, cxNavigator, dxDateRanges, dxBarBuiltInMenu,
System.ImageList, U_BaseInput, cxTL, cxMaskEdit, cxTLdxBarBuiltInMenu,
cxCheckBox, cxInplaceContainer, cxDBTL, cxTLData, math, dxScrollbarAnnotations,
cxImageList, cxContainer;
cxImageList, cxContainer, dxSkinsCore, dxSkinsDefaultPainters;
type
TfrmClothInfoSel = class(TfrmBaseHelp)
@ -136,6 +136,7 @@ type
GPM_3: TcxGridPopupMenu;
DS_3: TDataSource;
ADO_3: TADOQuery;
Tv1Column24: TcxGridDBColumn;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
@ -351,6 +352,13 @@ end;
procedure TfrmClothInfoSel.FormShow(Sender: TObject);
begin
inherited;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add(' exec P_BS_CloInfo_Hot ');
ExecSQL;
end;
IsOnShow := true;
if IsMultipleSelection then
GroupBox1.Visible := True;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,230 @@
unit U_ComContactSel;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
cxTextEdit, cxDBLookupComboBox, ComObj, cxLookAndFeels, cxLookAndFeelPainters,
cxNavigator, dxDateRanges, U_BaseHelp,
dxBarBuiltInMenu, System.ImageList, Vcl.ImgList,
dxScrollbarAnnotations, cxImageList, cxContainer, dxSkinsCore,
dxSkinsDefaultPainters;
type
FdDy = record
inc: integer; //客户端套接字句柄
FDdys: string[32]; //客户端套接字
FdDysName: string[32]; //客户端套接字
end;
TfrmComContactSel = class(TfrmBaseHelp)
ToolBar1: TToolBar;
TBRafresh: TToolButton;
TBClose: TToolButton;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
Panel1: TPanel;
ToolButton2: TToolButton;
ADOQueryMain: TADOQuery;
Label3: TLabel;
CoName: TcxTextEdit;
cxGridPopupMenu2: TcxGridPopupMenu;
DS_1: TDataSource;
CDS_1: TClientDataSet;
Label1: TLabel;
CoCode: TcxTextEdit;
btnOK: TToolButton;
ADOConnection1: TADOConnection;
ImageList1: TImageList;
cxImageList_bar: TcxImageList;
cxGrid1: TcxGrid;
TV1: TcxGridDBTableView;
TV1Column1: TcxGridDBColumn;
TV1Column2: TcxGridDBColumn;
TV1Column6: TcxGridDBColumn;
TV1Column7: TcxGridDBColumn;
cxGrid1Level1: TcxGridLevel;
TV1Column3: TcxGridDBColumn;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Tv1DblClick(Sender: TObject);
procedure UserIDPropertiesChange(Sender: TObject);
private
{ Private declarations }
procedure InitGrid();
procedure CheckGrid();
public
FCoCode: string;
FMultiple: Boolean;
FRTUserID, FRTUserName: string;
end;
var
frmComContactSel: TfrmComContactSel;
implementation
uses
U_DataLink, U_RTFun;
{$R *.dfm}
procedure TfrmComContactSel.CheckGrid();
var
fsj, fsj1: string;
FStrs: TStringList;
i: integer;
begin
if Trim(FRTUserID) <> '' then
begin
FStrs := TStringList.Create();
ExtractStrings([','], [' '], PChar(FRTUserID), FStrs);
with CDS_1 do
begin
First;
while not eof do
begin
if FStrs.IndexOf(Trim(FieldByName('UserID').AsString)) >= 0 then
begin
Edit;
FieldByName('SSel').Value := true;
Post;
end;
Next;
end;
end;
FStrs.Free;
end;
end;
procedure TfrmComContactSel.InitGrid();
begin
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Filtered := False;
Close;
SQL.Clear;
sql.Add('select A.*,B.* ');
sql.Add('from BS_Company A ');
sql.Add('left join BS_Company_contact B ON A.COID=B.COID ');
sql.Add('where A.CoCode=' + QuotedStr(Trim(FCoCode)));
Open;
end;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, CDS_1);
SInitCDSData(ADOQueryMain, CDS_1);
finally
ADOQueryMain.EnableControls;
end;
CheckGrid();
end;
procedure TfrmComContactSel.FormCreate(Sender: TObject);
begin
inherited;
try
with ADOConnection1 do
begin
Connected := false;
ConnectionString := DConString;
Connected := true;
end;
ADOQueryBaseCmd.Connection := ADOConnection1;
ADOQueryBaseTemp.Connection := ADOConnection1;
except
application.MessageBox('网络连接失败!', '提示信息');
end;
end;
procedure TfrmComContactSel.FormDestroy(Sender: TObject);
begin
inherited;
frmComContactSel := nil;
end;
procedure TfrmComContactSel.FormClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
Action := caFree;
end;
procedure TfrmComContactSel.TBCloseClick(Sender: TObject);
begin
WriteCxGrid(trim(self.caption), Tv1, '账户选择');
Close;
end;
procedure TfrmComContactSel.FormShow(Sender: TObject);
begin
inherited;
ReadCxGrid(trim(self.Caption), Tv1, '账户选择');
InitGrid();
end;
procedure TfrmComContactSel.TBRafreshClick(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmComContactSel.ToolButton2Click(Sender: TObject);
begin
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, CDS_1);
SInitCDSData(ADOQueryMain, CDS_1);
end;
end;
procedure TfrmComContactSel.Tv1DblClick(Sender: TObject);
begin
btnOK.Click;
end;
procedure TfrmComContactSel.UserIDPropertiesChange(Sender: TObject);
begin
ToolButton2.Click;
end;
procedure TfrmComContactSel.btnOKClick(Sender: TObject);
var
RTValues: TArray<string>;
begin
if FMultiple then
begin
if not CDS_1.Locate('SSel', true, []) then
begin
Application.MessageBox('请选择数据!', '提示', 0);
Exit;
end;
end;
RTValues := SelCDSKey(CDS_1, ['UserID', 'UserName']);
FRTUserID := RTValues[0];
FRTUserName := RTValues[1];
ModalResult := 1;
end;
end.

View File

@ -9,8 +9,8 @@ inherited frmCompanySel: TfrmCompanySel
Font.Name = #24494#36719#38597#40657
Position = poScreenCenter
OnClose = FormClose
ExplicitWidth = 1093
ExplicitHeight = 597
ExplicitWidth = 1085
ExplicitHeight = 589
PixelsPerInch = 96
TextHeight = 21
object cxGrid1: TcxGrid [0]
@ -20,6 +20,7 @@ inherited frmCompanySel: TfrmCompanySel
Height = 484
Align = alClient
TabOrder = 0
ExplicitTop = 70
object TV1: TcxGridDBTableView
OnDblClick = TV1DblClick
Navigator.Buttons.CustomButtons = <>
@ -70,15 +71,23 @@ inherited frmCompanySel: TfrmCompanySel
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
Width = 101
end
object TV1Column6: TcxGridDBColumn
Caption = #22320#22336
DataBinding.FieldName = 'CoAddress'
Caption = #26126#32454#22320#22336
DataBinding.FieldName = 'mxaddress'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 124
Width = 170
end
object TV1Column7: TcxGridDBColumn
Caption = #26126#32454#21306#22495
DataBinding.FieldName = 'mxarea'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 122
end
end
object cxGrid1Level1: TcxGridLevel

View File

@ -11,7 +11,7 @@ uses
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
cxLookAndFeelPainters, cxNavigator, dxDateRanges, dxBarBuiltInMenu,
System.ImageList, U_BaseInput, cxContainer, cxImageList,
dxScrollbarAnnotations;
dxScrollbarAnnotations, dxSkinsCore, dxSkinsDefaultPainters;
type
TfrmCompanySel = class(TfrmBaseHelp)
@ -57,6 +57,7 @@ type
TV1Column6: TcxGridDBColumn;
Label2: TLabel;
CoAbbrName: TcxTextEdit;
TV1Column7: TcxGridDBColumn;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
@ -132,7 +133,7 @@ begin
sql.Add(',BankName=(select top 1 BankName from Bs_Company_Bank X where X.CoID=A.CoID ) ');
sql.Add(',ContactsId=(select top 1 UserID from SY_User X where X.UserName=B.Contacts ) ');
sql.Add('from BS_Company A ');
sql.Add('left join BS_Company_contact B ON A.COID=B.COID ');
sql.Add('left join BS_Company_contact B ON A.COID=B.COID and B.IsDefault=1 ');
sql.Add('where 1=1 ');
if Trim(FCoType) <> '' then
begin
@ -189,7 +190,7 @@ end;
procedure TfrmCompanySel.FormDestroy(Sender: TObject);
begin
inherited;
frmCompanySel := nil;
frmCompanySel:= nil;
end;
end.

View File

@ -10,8 +10,8 @@ inherited frmUserSel: TfrmUserSel
Font.Name = #24494#36719#38597#40657
Position = poMainFormCenter
OnClose = FormClose
ExplicitWidth = 620
ExplicitHeight = 561
ExplicitWidth = 612
ExplicitHeight = 553
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]

View File

@ -15,7 +15,8 @@ uses
cxTextEdit, cxDBLookupComboBox, ComObj, cxLookAndFeels, cxLookAndFeelPainters,
cxNavigator, dxDateRanges, U_BaseHelp,
dxBarBuiltInMenu, System.ImageList, Vcl.ImgList,
dxScrollbarAnnotations, cxImageList, cxContainer;
dxScrollbarAnnotations, cxImageList, cxContainer, dxSkinsCore,
dxSkinsDefaultPainters;
type
FdDy = record

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,224 @@
unit U_VehicleSel;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
cxTextEdit, cxDBLookupComboBox, ComObj, cxLookAndFeels, cxLookAndFeelPainters,
cxNavigator, dxDateRanges, U_BaseHelp,
dxBarBuiltInMenu, System.ImageList, Vcl.ImgList,
dxScrollbarAnnotations, cxImageList, cxContainer, dxSkinsCore,
dxSkinsDefaultPainters;
type
FdDy = record
inc: integer; //客户端套接字句柄
FDdys: string[32]; //客户端套接字
FdDysName: string[32]; //客户端套接字
end;
TfrmVehicleSel = class(TfrmBaseHelp)
ToolBar1: TToolBar;
TBRafresh: TToolButton;
TBClose: TToolButton;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
Panel1: TPanel;
ToolButton2: TToolButton;
ADOQueryMain: TADOQuery;
Label3: TLabel;
UserName: TcxTextEdit;
cxGridPopupMenu2: TcxGridPopupMenu;
DS_1: TDataSource;
CDS_1: TClientDataSet;
Label1: TLabel;
UserID: TcxTextEdit;
btnOK: TToolButton;
ADOConnection1: TADOConnection;
ImageList1: TImageList;
cxImageList_bar: TcxImageList;
cxGrid1: TcxGrid;
Tv1: TcxGridDBTableView;
v2Column1: TcxGridDBColumn;
v2Column12: TcxGridDBColumn;
v2Column8: TcxGridDBColumn;
cxGridLevel1: TcxGridLevel;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Tv1DblClick(Sender: TObject);
procedure UserIDPropertiesChange(Sender: TObject);
private
{ Private declarations }
procedure InitGrid();
procedure CheckGrid();
public
Fdept: string;
FMultiple: Boolean;
FRTUserID, FRTUserName: string;
end;
var
frmVehicleSel: TfrmVehicleSel;
implementation
uses
U_DataLink, U_RTFun;
{$R *.dfm}
procedure TfrmVehicleSel.CheckGrid();
var
fsj, fsj1: string;
FStrs: TStringList;
i: integer;
begin
if Trim(FRTUserID) <> '' then
begin
FStrs := TStringList.Create();
ExtractStrings([','], [' '], PChar(FRTUserID), FStrs);
with CDS_1 do
begin
First;
while not eof do
begin
if FStrs.IndexOf(Trim(FieldByName('UserID').AsString)) >= 0 then
begin
Edit;
FieldByName('SSel').Value := true;
Post;
end;
Next;
end;
end;
FStrs.Free;
end;
end;
procedure TfrmVehicleSel.InitGrid();
begin
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Filtered := False;
Close;
SQL.Clear;
sql.Add(' select A.* from Bs_Vehicle A order by VNO ');
Open;
end;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, CDS_1);
SInitCDSData(ADOQueryMain, CDS_1);
finally
ADOQueryMain.EnableControls;
end;
CheckGrid();
end;
procedure TfrmVehicleSel.FormCreate(Sender: TObject);
begin
inherited;
try
with ADOConnection1 do
begin
Connected := false;
ConnectionString := DConString;
Connected := true;
end;
ADOQueryBaseCmd.Connection := ADOConnection1;
ADOQueryBaseTemp.Connection := ADOConnection1;
except
application.MessageBox('网络连接失败!', '提示信息');
end;
end;
procedure TfrmVehicleSel.FormDestroy(Sender: TObject);
begin
inherited;
frmVehicleSel := nil;
end;
procedure TfrmVehicleSel.FormClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
Action := caFree;
end;
procedure TfrmVehicleSel.TBCloseClick(Sender: TObject);
begin
WriteCxGrid(trim(self.caption), Tv1, '账户选择');
Close;
end;
procedure TfrmVehicleSel.FormShow(Sender: TObject);
begin
inherited;
ReadCxGrid(trim(self.Caption), Tv1, '账户选择');
InitGrid();
end;
procedure TfrmVehicleSel.TBRafreshClick(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmVehicleSel.ToolButton2Click(Sender: TObject);
begin
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, CDS_1);
SInitCDSData(ADOQueryMain, CDS_1);
end;
end;
procedure TfrmVehicleSel.Tv1DblClick(Sender: TObject);
begin
btnOK.Click;
end;
procedure TfrmVehicleSel.UserIDPropertiesChange(Sender: TObject);
begin
ToolButton2.Click;
end;
procedure TfrmVehicleSel.btnOKClick(Sender: TObject);
var
RTValues: TArray<string>;
begin
if FMultiple then
begin
if not CDS_1.Locate('SSel', true, []) then
begin
Application.MessageBox('请选择数据!', '提示', 0);
Exit;
end;
end;
RTValues := SelCDSKey(CDS_1, ['UserID', 'UserName']);
FRTUserID := RTValues[0];
FRTUserName := RTValues[1];
ModalResult := 1;
end;
end.

View File

@ -41,8 +41,9 @@ uses
U_WindowFormdesign in '..\..\..\public10\design\U_WindowFormdesign.pas',
FrameDateSel in '..\A00通用组件\FrameDateSel.pas' {frmFrameDateSel: TFrame},
FramePagingSel in '..\A00通用组件\FramePagingSel.pas' {frmFramePagingSel: TFrame},
U_UserSel in '..\A00通用窗体\U_UserSel.pas' {frmUserSel},
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas';
U_VehicleSel in '..\A00通用窗体\U_VehicleSel.pas' {frmVehicleSel},
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
U_UserSel in '..\A00通用窗体\U_UserSel.pas' {frmUserSel};
{$R *.res}
procedure DllEnterPoint(dwReason: DWORD); far; stdcall;

View File

@ -239,11 +239,15 @@
<FormType>dfm</FormType>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="..\A00通用窗体\U_VehicleSel.pas">
<Form>frmVehicleSel</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
<DCCReference Include="..\A00通用窗体\U_UserSel.pas">
<Form>frmUserSel</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>

View File

@ -9,8 +9,8 @@ inherited frmCustInput: TfrmCustInput
OldCreateOrder = True
Position = poScreenCenter
OnClose = FormClose
ExplicitWidth = 1616
ExplicitHeight = 712
ExplicitWidth = 1608
ExplicitHeight = 704
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
@ -30,7 +30,6 @@ inherited frmCustInput: TfrmCustInput
ParentColor = False
ShowCaptions = True
TabOrder = 0
ExplicitWidth = 1210
object ToolButton3: TToolButton
Left = 0
Top = 0
@ -68,7 +67,6 @@ inherited frmCustInput: TfrmCustInput
Ctl3D = False
ParentCtl3D = False
TabOrder = 1
ExplicitWidth = 1210
object Label2: TLabel
Left = 40
Top = 12
@ -380,7 +378,6 @@ inherited frmCustInput: TfrmCustInput
Align = alClient
Caption = 'Panel1'
TabOrder = 2
ExplicitWidth = 1210
object Panel3: TPanel
Left = 1
Top = 1
@ -389,7 +386,6 @@ inherited frmCustInput: TfrmCustInput
Align = alClient
Caption = 'Panel1'
TabOrder = 0
ExplicitWidth = 748
object ToolBar3: TToolBar
Tag = 1
Left = 1
@ -407,7 +403,6 @@ inherited frmCustInput: TfrmCustInput
ParentColor = False
ShowCaptions = True
TabOrder = 0
ExplicitWidth = 746
object ToolButton2: TToolButton
Left = 0
Top = 0
@ -441,7 +436,6 @@ inherited frmCustInput: TfrmCustInput
Align = alClient
BorderStyle = cxcbsNone
TabOrder = 1
ExplicitWidth = 746
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
@ -555,7 +549,6 @@ inherited frmCustInput: TfrmCustInput
Align = alRight
Caption = 'Panel1'
TabOrder = 1
ExplicitLeft = 749
object cxGrid1: TcxGrid
Left = 1
Top = 31

View File

@ -207,7 +207,7 @@ begin
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
MainType := 'Cust';
MainType := 'Cust'; fnote:=True; V1Note.caption := '区域代号';
flag := Copy(fsj, 1, FWZ - 1);
flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ);
if ShowModal = 1 then

View File

@ -201,6 +201,21 @@ object frmYGInPut: TfrmYGInPut
HeaderAlignmentHorz = taCenter
Width = 74
end
object Tv1Column7: TcxGridDBColumn
Caption = #36710#29260
DataBinding.FieldName = 'VNO'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = True
Properties.OnButtonClick = Tv1Column7PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 81
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1

View File

@ -46,6 +46,7 @@ type
Tv1Column4: TcxGridDBColumn;
Tv1Column5: TcxGridDBColumn;
Tv1Column6: TcxGridDBColumn;
Tv1Column7: TcxGridDBColumn;
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBSaveClick(Sender: TObject);
@ -53,6 +54,8 @@ type
procedure ToolButton2Click(Sender: TObject);
procedure v1SYRNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure v1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure Tv1Column7PropertiesButtonClick(Sender: TObject;
AButtonIndex: Integer);
private
TPInt: Integer;
procedure InitData();
@ -74,7 +77,7 @@ var
implementation
uses
U_DataLink, U_ZDYHelp, U_RTFun;
U_DataLink, U_ZDYHelp, U_RTFun,U_VehicleSel;
{$R *.dfm}
@ -276,6 +279,25 @@ begin
Order_Sub.Delete;
end;
procedure TfrmYGInPut.Tv1Column7PropertiesButtonClick(Sender: TObject;
AButtonIndex: Integer);
begin
frmVehicleSel := TfrmVehicleSel.Create(self);
with frmVehicleSel do
begin
if ShowModal = 1 then
begin
with Order_Sub do
begin
edit;
FieldByName('VNO').Value := Trim(frmVehicleSel.CDS_1.fieldbyname('VNO').AsString);
end;
end;
free;
end;
end;
procedure TfrmYGInPut.v1SYRNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
frmZDYHelp := TfrmZDYHelp.Create(self);

View File

@ -6,8 +6,9 @@ inherited frmEmployeeList: TfrmEmployeeList
Font.Height = -16
FormStyle = fsMDIChild
Visible = True
ExplicitWidth = 1539
ExplicitHeight = 548
ExplicitLeft = -217
ExplicitWidth = 1531
ExplicitHeight = 540
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
@ -339,6 +340,7 @@ inherited frmEmployeeList: TfrmEmployeeList
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 1
ExplicitLeft = 6
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -496,6 +498,14 @@ inherited frmEmployeeList: TfrmEmployeeList
HeaderAlignmentHorz = taCenter
Width = 74
end
object Tv1Column7: TcxGridDBColumn
Caption = #36710#29260
DataBinding.FieldName = 'VNO'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 58
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1

View File

@ -83,6 +83,7 @@ type
Tv1Column5: TcxGridDBColumn;
Tv1Column6: TcxGridDBColumn;
ToolButton1: TToolButton;
Tv1Column7: TcxGridDBColumn;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);

View File

@ -10,9 +10,8 @@ inherited frmClothInfo: TfrmClothInfo
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitLeft = -46
ExplicitWidth = 1556
ExplicitHeight = 620
ExplicitWidth = 1548
ExplicitHeight = 612
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
@ -20,7 +19,7 @@ inherited frmClothInfo: TfrmClothInfo
Left = 0
Top = 0
Width = 1540
Height = 60
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 99
@ -78,98 +77,81 @@ inherited frmClothInfo: TfrmClothInfo
ImageIndex = 3
OnClick = TBMLEditClick
end
object ToolButton8: TToolButton
Left = 458
Top = 0
AutoSize = True
Caption = #35774#20026#28909#38144
ImageIndex = 3
OnClick = ToolButton8Click
end
object ToolButton9: TToolButton
Left = 561
Top = 0
AutoSize = True
Caption = #21462#28040#28909#38144
ImageIndex = 3
OnClick = ToolButton9Click
end
object TBDel: TToolButton
Left = 664
Left = 458
Top = 0
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
Wrap = True
OnClick = TBDelClick
end
object ToolButton3: TToolButton
Left = 0
Top = 30
Left = 529
Top = 0
AutoSize = True
Caption = #26631#31614#25171#21360
ImageIndex = 21
OnClick = ToolButton3Click
end
object ToolButton7: TToolButton
Left = 103
Top = 30
Left = 632
Top = 0
AutoSize = True
Caption = #25209#37327#23548#20986
ImageIndex = 21
OnClick = ToolButton7Click
end
object ToolButton4: TToolButton
Left = 206
Top = 30
Left = 735
Top = 0
AutoSize = True
Caption = #23548#20837
ImageIndex = 18
OnClick = ToolButton4Click
end
object TBExport: TToolButton
Left = 277
Top = 30
Left = 806
Top = 0
AutoSize = True
Caption = #23548#20986
ImageIndex = 20
OnClick = TBExportClick
end
object TBUP: TToolButton
Left = 348
Top = 30
Left = 877
Top = 0
AutoSize = True
Caption = #22270#29255#19978#20256
ImageIndex = 19
OnClick = TBUPClick
end
object ToolButton5: TToolButton
Left = 451
Top = 30
Left = 980
Top = 0
AutoSize = True
Caption = #25805#20316#26085#24535
ImageIndex = 15
OnClick = ToolButton5Click
end
object ToolButton6: TToolButton
Left = 554
Top = 30
Left = 1083
Top = 0
AutoSize = True
Caption = #20462#25913#21382#21490
ImageIndex = 15
OnClick = ToolButton6Click
end
object ToolButton2: TToolButton
Left = 657
Top = 30
Left = 1186
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton2Click
end
object TBClose: TToolButton
Left = 760
Top = 30
Left = 1289
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
@ -178,17 +160,15 @@ inherited frmClothInfo: TfrmClothInfo
end
object cxSplitter1: TcxSplitter [1]
Left = 220
Top = 105
Top = 75
Width = 8
Height = 476
Height = 506
HotZoneClassName = 'TcxMediaPlayer9Style'
Control = Panel5
ExplicitTop = 175
ExplicitHeight = 670
end
object Panel1: TPanel [2]
Left = 0
Top = 60
Top = 30
Width = 1540
Height = 45
Align = alTop
@ -283,20 +263,18 @@ inherited frmClothInfo: TfrmClothInfo
end
object Panel5: TPanel [4]
Left = 0
Top = 105
Top = 75
Width = 220
Height = 476
Height = 506
Align = alLeft
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 2
ExplicitTop = 175
ExplicitHeight = 670
object cxDBTreeList1: TcxDBTreeList
Left = 2
Top = 2
Width = 216
Height = 472
Height = 502
Align = alClient
Bands = <
item
@ -314,7 +292,6 @@ inherited frmClothInfo: TfrmClothInfo
ScrollbarAnnotations.CustomAnnotations = <>
TabOrder = 0
OnDblClick = cxDBTreeList1DblClick
ExplicitHeight = 666
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
DataBinding.FieldName = 'CTName'
Width = 210
@ -328,17 +305,14 @@ inherited frmClothInfo: TfrmClothInfo
end
object Panel3: TPanel [5]
Left = 228
Top = 105
Top = 75
Width = 1108
Height = 476
Height = 506
Align = alClient
BevelInner = bvRaised
BevelOuter = bvLowered
Caption = 'Panel3'
TabOrder = 4
ExplicitTop = 175
ExplicitWidth = 1312
ExplicitHeight = 670
object Panel7: TPanel
Left = 2
Top = 2
@ -347,7 +321,6 @@ inherited frmClothInfo: TfrmClothInfo
Align = alTop
BevelOuter = bvNone
TabOrder = 0
ExplicitWidth = 1308
object Panel4: TPanel
Left = 0
Top = 0
@ -357,7 +330,6 @@ inherited frmClothInfo: TfrmClothInfo
AutoSize = True
ParentColor = True
TabOrder = 0
ExplicitWidth = 1308
DesignSize = (
1104
40)
@ -425,14 +397,12 @@ inherited frmClothInfo: TfrmClothInfo
end
object Panel9: TPanel
Left = 2
Top = 269
Top = 299
Width = 1104
Height = 205
Align = alBottom
Caption = 'Panel9'
TabOrder = 1
ExplicitTop = 463
ExplicitWidth = 1308
object Panel10: TPanel
Left = 1
Top = 1
@ -441,7 +411,6 @@ inherited frmClothInfo: TfrmClothInfo
Align = alClient
Caption = 'Panel9'
TabOrder = 0
ExplicitWidth = 1306
object GroupBox1: TGroupBox
Left = 1
Top = 1
@ -450,7 +419,6 @@ inherited frmClothInfo: TfrmClothInfo
Align = alClient
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
TabOrder = 0
ExplicitWidth = 1304
object ScrollBox1: TScrollBox
Left = 2
Top = 23
@ -460,7 +428,6 @@ inherited frmClothInfo: TfrmClothInfo
BevelInner = bvLowered
BorderStyle = bsNone
TabOrder = 0
ExplicitWidth = 1300
end
end
end
@ -469,11 +436,10 @@ inherited frmClothInfo: TfrmClothInfo
Left = 10
Top = 42
Width = 1088
Height = 227
Height = 257
Align = alClient
PopupMenu = PM_1
TabOrder = 2
ExplicitHeight = 421
object Tv1: TcxGridDBTableView
OnDblClick = Tv1DblClick
OnMouseDown = Tv1MouseDown
@ -509,8 +475,8 @@ inherited frmClothInfo: TfrmClothInfo
Width = 70
end
object Tv1Column11: TcxGridDBColumn
Caption = #28909#38144#27454
DataBinding.FieldName = 'isrx'
Caption = #28909#24230
DataBinding.FieldName = 'HotQty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 76
@ -720,17 +686,15 @@ inherited frmClothInfo: TfrmClothInfo
Left = 2
Top = 42
Width = 8
Height = 227
Height = 257
HotZoneClassName = 'TcxMediaPlayer9Style'
ExplicitHeight = 421
end
object cxSplitter3: TcxSplitter
Left = 1098
Top = 42
Width = 8
Height = 227
Height = 257
AlignSplitter = salRight
ExplicitLeft = 1091
end
end
inherited loadProcess: TPanel
@ -748,14 +712,11 @@ inherited frmClothInfo: TfrmClothInfo
end
object cxGrid2: TcxGrid [8]
Left = 1336
Top = 105
Top = 75
Width = 204
Height = 476
Height = 506
Align = alRight
TabOrder = 8
ExplicitLeft = 1106
ExplicitTop = 42
ExplicitHeight = 421
object Tv2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>

View File

@ -132,8 +132,6 @@ type
cxSplitter3: TcxSplitter;
ToolButton7: TToolButton;
Tv1Column11: TcxGridDBColumn;
ToolButton8: TToolButton;
ToolButton9: TToolButton;
cxGrid2: TcxGrid;
Tv2: TcxGridDBTableView;
cxGridDBColumn1: TcxGridDBColumn;
@ -174,7 +172,6 @@ type
procedure ToolButton6Click(Sender: TObject);
procedure ToolButton7Click(Sender: TObject);
procedure ToolButton8Click(Sender: TObject);
procedure ToolButton9Click(Sender: TObject);
procedure Tv1DblClick(Sender: TObject);
private
{ Private declarations }
@ -432,7 +429,13 @@ end;
procedure TfrmClothInfo.FormShow(Sender: TObject);
begin
inherited;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add(' exec P_BS_CloInfo_Hot ');
ExecSQL;
end;
ReadCxGrid(self.Caption + 'TV1', Tv1, 'ÑùÆ·¹ÜÀí');
ReadCxGrid(self.Caption + 'TV2', Tv2, 'ÑùÆ·¹ÜÀí');
@ -1032,92 +1035,15 @@ procedure TfrmClothInfo.ToolButton8Click(Sender: TObject);
var
MCTID: string;
begin
if CDS_1.IsEmpty then
exit;
if CDS_1.Locate('ssel', true, []) = false then
begin
Application.MessageBox('没有选择数据!', '提示', 0);
Exit;
end;
try
with CDS_1 do
begin
DisableControls;
First;
while not eof do
begin
if fieldbyname('ssel').AsBoolean then
begin
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('update BS_Cloth_Info SET isrx=''是'' ');
sql.Add('where BCIID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
execsql;
end;
end;
next;
end;
First;
EnableControls;
end;
application.MessageBox('操作成功!', '提示信息');
initGrid();
except
CDS_1.EnableControls;
application.MessageBox('操作失败!', '提示信息', 0);
end;
end;
procedure TfrmClothInfo.ToolButton9Click(Sender: TObject);
var
MCTID: string;
begin
if CDS_1.IsEmpty then
exit;
if CDS_1.Locate('ssel', true, []) = false then
begin
Application.MessageBox('没有选择数据!', '提示', 0);
Exit;
end;
try
with CDS_1 do
begin
DisableControls;
First;
while not eof do
begin
if fieldbyname('ssel').AsBoolean then
begin
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('update BS_Cloth_Info SET isrx=NULL ');
sql.Add('where BCIID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
execsql;
end;
end;
next;
end;
First;
EnableControls;
end;
application.MessageBox('操作成功!', '提示信息');
initGrid();
except
CDS_1.EnableControls;
application.MessageBox('操作失败!', '提示信息', 0);
end;
end;
procedure TfrmClothInfo.Tv1DblClick(Sender: TObject);
begin
ToolButton1.Click;
if TBEdit.Visible and TBEdit.Enabled then
TBEdit.Click
else
ToolButton1.Click;
end;
procedure TfrmClothInfo.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

View File

@ -95,7 +95,7 @@ object frmClothInfoInput: TfrmClothInfoInput
Left = 0
Top = 0
Width = 749
Height = 357
Height = 385
Align = alTop
TabOrder = 1
object Label1: TLabel
@ -106,29 +106,29 @@ object frmClothInfoInput: TfrmClothInfoInput
Caption = #20135#21697#32534#21495
end
object Label5: TLabel
Left = 421
Top = 18
Left = 37
Top = 57
Width = 64
Height = 21
Caption = #33394#24067#21517#31216
end
object Label15: TLabel
Left = 37
Top = 95
Left = 422
Top = 57
Width = 64
Height = 21
Caption = #26377#25928#38376#24133
end
object Label22: TLabel
Left = 420
Top = 56
Left = 37
Top = 95
Width = 64
Height = 21
Caption = #25104#21697#20811#37325
end
object Label4: TLabel
Left = 37
Top = 56
Left = 422
Top = 18
Width = 64
Height = 21
Caption = #33457#22411#32534#21495
@ -142,15 +142,15 @@ object frmClothInfoInput: TfrmClothInfoInput
Visible = False
end
object Label6: TLabel
Left = 37
Top = 133
Left = 422
Top = 95
Width = 32
Height = 21
Caption = #35268#26684
end
object Label9: TLabel
Left = 38
Top = 293
Left = 37
Top = 299
Width = 32
Height = 21
Caption = #22791#27880
@ -164,36 +164,36 @@ object frmClothInfoInput: TfrmClothInfoInput
Visible = False
end
object Label10: TLabel
Left = 386
Top = 454
Left = 468
Top = 462
Width = 64
Height = 21
Caption = #33521#25991#25104#20998
Visible = False
end
object Label16: TLabel
Left = 420
Top = 170
Left = 422
Top = 173
Width = 32
Height = 21
Caption = #24037#33402
end
object Label18: TLabel
Left = 426
Top = 282
Top = 285
Width = 80
Height = 21
Caption = #20379#24212#21830#20195#21495
end
object Label19: TLabel
Left = 420
Top = 246
Left = 422
Top = 249
Width = 48
Height = 21
Caption = #20379#24212#21830
end
object Label21: TLabel
Left = 389
Left = 309
Top = 454
Width = 64
Height = 21
@ -201,29 +201,29 @@ object frmClothInfoInput: TfrmClothInfoInput
Visible = False
end
object Label23: TLabel
Left = 420
Top = 208
Left = 422
Top = 211
Width = 64
Height = 21
Caption = #26579#33394#26041#24335
end
object Label2: TLabel
Left = 37
Top = 212
Top = 211
Width = 64
Height = 21
Caption = #26631#20934#25253#20215
end
object Label8: TLabel
Left = 37
Top = 172
Top = 173
Width = 64
Height = 21
Caption = #37197#36135#31995#25968
end
object Label13: TLabel
Left = 420
Top = 132
Left = 422
Top = 135
Width = 64
Height = 21
Caption = #37197#39069#38480#21046
@ -236,38 +236,36 @@ object frmClothInfoInput: TfrmClothInfoInput
Caption = '%'
end
object Label20: TLabel
Left = 420
Top = 94
Left = 37
Top = 135
Width = 32
Height = 21
Caption = #24211#20301
end
object Label17: TLabel
Left = 37
Top = 454
Width = 41
Top = 347
Width = 32
Height = 21
Caption = #21697#21517'1'
Visible = False
Caption = #20027#24067
end
object Label24: TLabel
Left = 433
Top = 454
Width = 41
Left = 425
Top = 347
Width = 32
Height = 21
Caption = #21697#21517'2'
Visible = False
Caption = #27425#24067
end
object Label25: TLabel
Left = 37
Top = 247
Top = 249
Width = 64
Height = 21
Caption = #35745#20215#21333#20301
end
object Label12: TLabel
Left = 364
Top = 477
Left = 363
Top = 481
Width = 64
Height = 21
Caption = #32433#32447#24418#24577
@ -276,7 +274,7 @@ object frmClothInfoInput: TfrmClothInfoInput
object C_Code: TcxTextEdit
Tag = 2
Left = 119
Top = 12
Top = 14
Enabled = False
TabOrder = 0
OnKeyPress = CYColorKeyPress
@ -284,16 +282,16 @@ object frmClothInfoInput: TfrmClothInfoInput
end
object C_Name: TcxTextEdit
Tag = 2
Left = 507
Top = 13
Left = 119
Top = 56
TabOrder = 1
OnKeyPress = CYColorKeyPress
Width = 234
end
object C_GramWeight: TcxButtonEdit
Tag = 2
Left = 507
Top = 51
Left = 119
Top = 91
Hint = 'C_GramWeight/'#20811#37325
Properties.Buttons = <
item
@ -327,8 +325,8 @@ object frmClothInfoInput: TfrmClothInfoInput
end
object C_Spec: TcxButtonEdit
Tag = 2
Left = 119
Top = 128
Left = 504
Top = 91
Hint = 'C_Spec/'#35268#26684
Properties.Buttons = <
item
@ -345,7 +343,7 @@ object frmClothInfoInput: TfrmClothInfoInput
object C_FromName: TcxButtonEdit
Tag = 7
Left = 119
Top = 454
Top = 344
Properties.Buttons = <
item
Default = True
@ -355,14 +353,13 @@ object frmClothInfoInput: TfrmClothInfoInput
Properties.OnButtonClick = C_FromNamePropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 5
Visible = False
OnDblClick = C_GramWeightDblClick
Width = 234
end
object C_Width: TcxButtonEdit
Tag = 2
Left = 119
Top = 91
Left = 504
Top = 53
Hint = 'C_Width/'#38376#24133
Properties.Buttons = <
item
@ -378,8 +375,8 @@ object frmClothInfoInput: TfrmClothInfoInput
end
object C_Pattern: TcxButtonEdit
Tag = 2
Left = 119
Top = 52
Left = 504
Top = 14
Hint = 'C_Pattern/'#33457#22411
Properties.Buttons = <
item
@ -395,8 +392,8 @@ object frmClothInfoInput: TfrmClothInfoInput
end
object CINote: TcxMemo
Tag = 2
Left = 116
Top = 285
Left = 119
Top = 281
TabOrder = 8
Height = 57
Width = 622
@ -430,31 +427,32 @@ object frmClothInfoInput: TfrmClothInfoInput
end
object CraftCode: TcxTextEdit
Tag = 2
Left = 507
Top = 167
Left = 504
Top = 169
TabOrder = 11
OnKeyPress = CYColorKeyPress
Width = 234
end
object FtyNo: TcxTextEdit
Tag = 2
Left = 506
Top = 278
Left = 81
Top = 474
TabOrder = 12
Visible = False
OnKeyPress = CYColorKeyPress
Width = 234
end
object FtyName: TcxTextEdit
Tag = 2
Left = 507
Top = 244
Left = 504
Top = 245
TabOrder = 13
OnKeyPress = CYColorKeyPress
Width = 234
end
object C_EName: TcxTextEdit
Tag = 2
Left = 475
Left = 491
Top = 454
TabOrder = 14
Visible = False
@ -463,16 +461,16 @@ object frmClothInfoInput: TfrmClothInfoInput
end
object DyeingMethod: TcxTextEdit
Tag = 2
Left = 507
Top = 206
Left = 504
Top = 207
TabOrder = 15
OnKeyPress = CYColorKeyPress
Width = 234
end
object CostPrice: TcxCurrencyEdit
Tag = 2
Left = 118
Top = 208
Left = 119
Top = 207
EditValue = 0.000000000000000000
Properties.AssignedValues.DisplayFormat = True
Properties.OnEditValueChanged = CostPricePropertiesEditValueChanged
@ -482,24 +480,24 @@ object frmClothInfoInput: TfrmClothInfoInput
object distributionCoefficient: TcxCurrencyEdit
Tag = 2
Left = 119
Top = 167
Top = 169
Properties.AssignedValues.DisplayFormat = True
TabOrder = 17
Width = 234
end
object quota: TcxCurrencyEdit
Tag = 2
Left = 507
Top = 129
Left = 504
Top = 131
EditValue = 10.000000000000000000
Properties.AssignedValues.DisplayFormat = True
TabOrder = 18
Width = 210
Width = 234
end
object C_FromName2: TcxButtonEdit
Tag = 7
Left = 505
Top = 454
Left = 510
Top = 343
Properties.Buttons = <
item
Default = True
@ -509,48 +507,33 @@ object frmClothInfoInput: TfrmClothInfoInput
Properties.OnButtonClick = C_FromName2PropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 19
Visible = False
OnDblClick = C_GramWeightDblClick
Width = 234
end
object StkPosition: TcxMRUEdit
Left = 511
Top = 96
Left = 119
Top = 131
Hint = 'StkPosition/'#24211#20301
ParentFont = False
Properties.ImmediatePost = True
Properties.ReadOnly = False
Properties.OnButtonClick = StkPositionPropertiesButtonClick
Style.Font.Charset = GB2312_CHARSET
Style.Font.Color = clWindowText
Style.Font.Height = -16
Style.Font.Name = #23435#20307
Style.Font.Style = []
Style.IsFontAssigned = True
TabOrder = 20
Width = 233
Width = 234
end
object qtyunit: TcxMRUEdit
Left = 118
Top = 248
Left = 119
Top = 245
Hint = 'qtyunit/'#25968#37327#21333#20301
ParentFont = False
Properties.ImmediatePost = True
Properties.ReadOnly = False
Properties.OnButtonClick = StkPositionPropertiesButtonClick
Style.Font.Charset = GB2312_CHARSET
Style.Font.Color = clWindowText
Style.Font.Height = -16
Style.Font.Name = #23435#20307
Style.Font.Style = []
Style.IsFontAssigned = True
TabOrder = 21
Width = 233
Width = 234
end
object C_YarnSpec: TcxTextEdit
Tag = 2
Left = 446
Top = 477
Left = 364
Top = 510
TabOrder = 22
Visible = False
OnKeyPress = CYColorKeyPress
@ -559,11 +542,13 @@ object frmClothInfoInput: TfrmClothInfoInput
end
object Panel3: TPanel
Left = 0
Top = 357
Top = 385
Width = 749
Height = 287
Height = 259
Align = alClient
TabOrder = 2
ExplicitTop = 357
ExplicitHeight = 287
object ToolBar3: TToolBar
Left = 1
Top = 1
@ -599,11 +584,10 @@ object frmClothInfoInput: TfrmClothInfoInput
Left = 1
Top = 31
Width = 747
Height = 255
Height = 227
Align = alClient
TabOrder = 1
ExplicitLeft = -2
ExplicitTop = 37
ExplicitHeight = 255
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>

View File

@ -129,6 +129,7 @@ type
procedure InitGrid1();
function SaveData(): Boolean;
procedure setName();
procedure addColor();
{ Private declarations }
public
FBCIID, FCTID: string;
@ -147,11 +148,41 @@ uses
U_CompanySel;
{$R *.dfm}
procedure TfrmClothInfoInput.addColor();
begin
with ADOQueryTemp do
begin
Close;
SQL.Clear;
sql.Add('select A.* from BS_Cloth_Info_Sub A where A.BCIID=' + QuotedStr(Trim(C_FromName.Properties.LookupItems.Text)));
Open;
end;
with ADOQueryTemp do
begin
DisableControls;
First;
while not Eof do
begin
with CDS_1 do
begin
Append;
fieldbyname('C_Color').Value := ADOQueryTemp.fieldbyname('C_Color').Value;
fieldbyname('C_ColorNo').Value := ADOQueryTemp.fieldbyname('C_ColorNo').Value;
fieldbyname('floatPrice').Value := 0;
fieldbyname('referencePrice').value := StrToFloatDef(CostPrice.Text, 0);
Post;
end;
Next;
end;
EnableControls;
end;
end;
procedure TfrmClothInfoInput.setName();
begin
if (Trim(C_FromName.Text) <> '') and (Trim(C_FromName2.Text) <> '') then
C_Name.Text := Trim(C_FromName.Text) + '+' + Trim(C_FromName2.Text);
C_Name.Text := Trim(C_FromName.Text) + '' + Trim(C_FromName2.Text);
end;
procedure TfrmClothInfoInput.StkPositionPropertiesButtonClick(Sender: TObject);
@ -183,7 +214,7 @@ var
begin
SqlStr := 'select A.* from BS_Cloth_Info_Sub A ';
SqlStr := SqlStr + ' where A.BCIID=''' + Trim(FBCIID) + '''';
SqlStr := SqlStr + 'ORDER BY CASE WHEN C_COLORNO NOT LIKE ''%[^0-9]%'' THEN dbo.getNum(C_Colorno) ELSE 9999999999 ';
SqlStr := SqlStr + ' ORDER BY CASE WHEN C_COLORNO NOT LIKE ''%[^0-9]%'' THEN dbo.getNum(C_Colorno) ELSE 9999999999 ';
SqlStr := SqlStr + ' END ,C_ColorNo';
InitCDSData(ADO_1, CDS_1, Tv1, SqlStr, '', '');
@ -271,6 +302,8 @@ begin
C_FromName.Properties.LookupItems.Text := Trim(CDS_1.fieldbyname('BCIID').AsString);
C_FromName.Text := Trim(CDS_1.fieldbyname('C_Name').AsString);
setName();
addColor();
end;
end;
finally
@ -310,12 +343,24 @@ end;
procedure TfrmClothInfoInput.FormShow(Sender: TObject);
begin
readCxGrid(self.Caption + 'TV1', Tv1, '样品管理');
if FCTID = 'CT2412300005' then
begin
C_Name.Enabled := False;
C_FromName.Enabled := True;
C_FromName2.Enabled := True;
end
else
begin
C_Name.Enabled := True;
C_FromName.Enabled := False;
C_FromName2.Enabled := False;
end;
with ADOQueryTemp do
begin
close;
sql.Clear;
sql.Add('select * from KH_ZDY where type=''StkPosition''');
Open;
if isEmpty then
begin
@ -324,7 +369,6 @@ begin
StkPosition.Properties.LookupItems.Clear;
while not Eof do
begin
StkPosition.Properties.LookupItems.Add(Trim(fieldByName('zdyName').AsString));
Next;
end;
@ -367,8 +411,6 @@ begin
begin
HiddenTVColumn(TV1, 'floatPrice');
HiddenTVColumn(TV1, 'referencePrice');
// CostPrice.Enabled := False;
// CostPrice.ParentFont := False;
CostPrice.Properties.ReadOnly := True;
CostPrice.Properties.EchoMode := eemPassword;
end;
@ -675,11 +717,31 @@ begin
Application.MessageBox('请输入产品颜色明细!', '提示', 0);
Exit;
end;
if Trim(C_Name.Text) = '' then
if FCTID = 'CT2412300005' then
begin
Application.MessageBox('请输入中文品名!', '提示', 0);
Exit;
if Trim(C_FromName.Text) = '' then
begin
Application.MessageBox('请输入中文品名!', '提示', 0);
Exit;
end;
if Trim(C_FromName2.Text) = '' then
begin
Application.MessageBox('请输入中文品名!', '提示', 0);
Exit;
end;
setName();
end
else
begin
if Trim(C_Name.Text) = '' then
begin
Application.MessageBox('请输入中文品名!', '提示', 0);
Exit;
end;
end;
// if CDS_1.Locate('C_Color', null, []) = True then
// begin
// Application.MessageBox('请输入颜色!', '提示', 0);

View File

@ -7,8 +7,8 @@ inherited frmMachineInPut: TfrmMachineInPut
Color = clWhite
Font.Height = -16
Position = poMainFormCenter
ExplicitWidth = 648
ExplicitHeight = 372
ExplicitWidth = 640
ExplicitHeight = 364
PixelsPerInch = 96
TextHeight = 21
object cxGrid2: TcxGrid [0]
@ -18,6 +18,7 @@ inherited frmMachineInPut: TfrmMachineInPut
Height = 303
Align = alClient
TabOrder = 0
ExplicitTop = 36
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -56,20 +57,6 @@ inherited frmMachineInPut: TfrmMachineInPut
HeaderAlignmentHorz = taCenter
Width = 100
end
object Tv1Column2: TcxGridDBColumn
Caption = #21496#26426
DataBinding.FieldName = 'Driver'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.OnButtonClick = Tv1Column2PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 226
end
end
object cxGrid2Level1: TcxGridLevel
GridView = Tv1

View File

@ -11,7 +11,8 @@ uses
cxGridPopupMenu, ADODB, DBClient, cxButtonEdit, cxTextEdit, StdCtrls, ExtCtrls,
StrUtils, U_BaseInput, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
dxDateRanges, dxScrollbarAnnotations, cxContainer, dxBarBuiltInMenu,
System.ImageList, Vcl.ImgList, cxImageList;
System.ImageList, Vcl.ImgList, cxImageList, dxSkinsCore,
dxSkinsDefaultPainters;
type
TfrmMachineInPut = class(TfrmBaseInput)
@ -32,7 +33,6 @@ type
cxGridPopupMenu2: TcxGridPopupMenu;
ToolButton1: TToolButton;
Tv1Column1: TcxGridDBColumn;
Tv1Column2: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);

View File

@ -6,8 +6,8 @@ inherited frmMachineManage: TfrmMachineManage
ClientWidth = 1107
Font.Height = -16
KeyPreview = True
ExplicitWidth = 1123
ExplicitHeight = 562
ExplicitWidth = 1115
ExplicitHeight = 554
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
@ -18,7 +18,7 @@ inherited frmMachineManage: TfrmMachineManage
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 59
ButtonWidth = 67
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_BaseInfo.cxImageList_bar
@ -36,7 +36,7 @@ inherited frmMachineManage: TfrmMachineManage
OnClick = TBRafreshClick
end
object ToolButton2: TToolButton
Left = 63
Left = 71
Top = 0
AutoSize = True
Caption = #36807#28388
@ -44,7 +44,7 @@ inherited frmMachineManage: TfrmMachineManage
Visible = False
end
object ToolButton4: TToolButton
Left = 126
Left = 142
Top = 0
AutoSize = True
Caption = #26032#22686
@ -52,7 +52,7 @@ inherited frmMachineManage: TfrmMachineManage
OnClick = ToolButton4Click
end
object ToolButton6: TToolButton
Left = 189
Left = 213
Top = 0
AutoSize = True
Caption = #20462#25913
@ -60,7 +60,7 @@ inherited frmMachineManage: TfrmMachineManage
OnClick = ToolButton6Click
end
object ToolButton5: TToolButton
Left = 252
Left = 284
Top = 0
AutoSize = True
Caption = #21024#34892
@ -68,7 +68,7 @@ inherited frmMachineManage: TfrmMachineManage
OnClick = ToolButton5Click
end
object ToolButton3: TToolButton
Left = 315
Left = 355
Top = 0
AutoSize = True
Caption = #25171#21360
@ -76,7 +76,7 @@ inherited frmMachineManage: TfrmMachineManage
OnClick = ToolButton3Click
end
object ToolButton1: TToolButton
Left = 378
Left = 426
Top = 0
AutoSize = True
Caption = #23548#20986
@ -84,7 +84,7 @@ inherited frmMachineManage: TfrmMachineManage
OnClick = ToolButton1Click
end
object TBClose: TToolButton
Left = 441
Left = 497
Top = 0
AutoSize = True
Caption = #20851#38381
@ -163,12 +163,6 @@ inherited frmMachineManage: TfrmMachineManage
Options.Editing = False
Width = 180
end
object Tv2Column1: TcxGridDBColumn
Caption = #21496#26426
DataBinding.FieldName = 'Driver'
DataBinding.IsNullValueType = True
Options.Editing = False
end
end
object cxGridLevel1: TcxGridLevel
GridView = Tv2
@ -197,7 +191,6 @@ inherited frmMachineManage: TfrmMachineManage
Left = 91
Top = 6
ParentColor = True
ParentFont = False
Properties.OnChange = MCNOPropertiesChange
TabOrder = 0
Width = 158

View File

@ -15,7 +15,7 @@ uses
cxTextEdit, cxPC, cxCheckComboBox, cxDropDownEdit, Menus, RM_e_Xls,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxDateRanges,
dxBarBuiltInMenu, U_BaseList, RM_BarCode, dxScrollbarAnnotations, cxContainer,
cxProgressBar;
cxProgressBar, dxSkinsCore, dxSkinsDefaultPainters;
type
TfrmMachineManage = class(TfrmBaseList)
@ -46,7 +46,6 @@ type
v2Column1: TcxGridDBColumn;
ToolButton6: TToolButton;
VNO: TcxTextEdit;
Tv2Column1: TcxGridDBColumn;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);

View File

@ -75,7 +75,8 @@ uses
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
U_TradeRRList in 'U_TradeRRList.pas' {frmTradeRRList},
U_TradeRRInPut in 'U_TradeRRInPut.pas' {frmTradeRRInPut},
U_RPFun in '..\..\..\public10\ThreeFun\Fun\U_RPFun.pas';
U_RPFun in '..\..\..\public10\ThreeFun\Fun\U_RPFun.pas',
U_InputReceiptType in 'U_InputReceiptType.pas' {frmInputReceiptType};
{$R *.res}

View File

@ -363,6 +363,10 @@
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_RPFun.pas"/>
<DCCReference Include="U_InputReceiptType.pas">
<Form>frmInputReceiptType</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>

View File

@ -0,0 +1,58 @@
object frmInputReceiptType: TfrmInputReceiptType
Left = 682
Top = 315
Caption = #35831#36755#20837#25991#26412
ClientHeight = 86
ClientWidth = 467
Color = clWhite
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
PixelsPerInch = 96
TextHeight = 13
object Panel1: TPanel
Left = 0
Top = 0
Width = 467
Height = 86
Align = alClient
TabOrder = 0
ExplicitHeight = 123
object Button1: TButton
Left = 308
Top = 14
Width = 111
Height = 59
Caption = #30830#35748
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -35
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
OnClick = Button1Click
end
object cxComboBox1: TcxComboBox
Left = 24
Top = 24
ParentFont = False
Properties.Items.Strings = (
''
#23458#25143#36864#22238
#24102#22238)
Style.Font.Charset = ANSI_CHARSET
Style.Font.Color = clWindowText
Style.Font.Height = -27
Style.Font.Name = #24494#36719#38597#40657
Style.Font.Style = []
Style.IsFontAssigned = True
TabOrder = 1
Width = 257
end
end
end

View File

@ -0,0 +1,39 @@
unit U_InputReceiptType;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, DB, ADODB, cxGraphics, cxControls,
cxLookAndFeels, cxLookAndFeelPainters, cxContainer, cxEdit, cxTextEdit,
cxMaskEdit, cxDropDownEdit;
type
TfrmInputReceiptType = class(TForm)
Panel1: TPanel;
Button1: TButton;
cxComboBox1: TcxComboBox;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
FFFIDS: string;
{ Public declarations }
end;
var
frmInputReceiptType: TfrmInputReceiptType;
implementation
{$R *.dfm}
procedure TfrmInputReceiptType.Button1Click(Sender: TObject);
begin
ModalResult := 1;
end;
end.

View File

@ -7,8 +7,8 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
Font.Charset = GB2312_CHARSET
Font.Height = -16
Position = poMainFormCenter
ExplicitWidth = 1169
ExplicitHeight = 632
ExplicitWidth = 1161
ExplicitHeight = 624
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
@ -27,7 +27,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
List = True
ShowCaptions = True
TabOrder = 0
ExplicitWidth = 1040
object TBSave: TToolButton
Left = 0
Top = 0
@ -84,7 +83,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
List = True
ShowCaptions = True
TabOrder = 1
ExplicitWidth = 1040
object btnAdd: TToolButton
Left = 0
Top = 0
@ -119,7 +117,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
Align = alClient
Caption = 'Panel2'
TabOrder = 2
ExplicitWidth = 1040
object Panel3: TPanel
Left = 1
Top = 1
@ -128,7 +125,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
Align = alClient
Caption = 'Panel2'
TabOrder = 0
ExplicitWidth = 1038
object cxGrid1: TcxGrid
Left = 1
Top = 1
@ -137,7 +133,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
Align = alClient
PopupMenu = PopupMenu2
TabOrder = 0
ExplicitWidth = 1036
object Tv1: TcxGridDBTableView
OnDblClick = Tv1DblClick
OnMouseDown = Tv1MouseDown
@ -350,7 +345,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
Ctl3D = False
ParentCtl3D = False
TabOrder = 3
ExplicitWidth = 1040
object Label3: TLabel
Left = 377
Top = 11

View File

@ -16,7 +16,7 @@ uses
U_BaseInput, cxImage, cxDBEdit, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdExplicitTLSClientServerBase, IdFTP, ShellAPI,
dxScrollbarAnnotations, cxImageList, dxSkinsCore, dxSkinsDefaultPainters,
dxCore, cxDateUtils, Clipbrd, cxDBLookupComboBox;
dxCore, cxDateUtils, Clipbrd, cxDBLookupComboBox, System.JSON, uSZHN_JSON;
type
TfrmItemizedListInPut = class(TfrmBaseInput)
@ -345,6 +345,13 @@ var
i: Integer;
begin
inherited;
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add(' exec P_BS_CloInfo_Hot ');
ExecSQL;
end;
readCxGrid(TRIM(SELF.Caption) + 'Tv1', Tv1, '生产指示单管理');
readCxGrid(TRIM(SELF.Caption) + 'Tv2', Tv1, '生产指示单管理');
TIMNo.Text := '';
@ -354,7 +361,7 @@ begin
begin
Close;
sql.Clear;
sql.Add(' SELECT C_Code,C_Name,qtyunit FROM Bs_Cloth_Info');
sql.Add(' SELECT C_Code,C_Name,qtyunit FROM Bs_Cloth_Info order by HotQty desc ');
Open;
end;
with ADO_YS do
@ -597,18 +604,19 @@ end;
procedure TfrmItemizedListInPut.ToolButton1Click(Sender: TObject);
var
MFiltration: string;
MPrintJson: string;
MPrintJson, MTISIds: string;
JSONObject: TJSONObject; // JSONÀà
begin
if FTIMID = '' then
Exit;
MTISIds := SelCDSKey(CDS_1, ['TISId'])[0];
with ADOQueryBaseTemp do
begin
close;
sql.Clear;
sql.Add(' select Filtration= SUBSTRING(CAST((select distinct '','' +A.BCIOID from BS_Cloth_IO A ');
sql.Add(' where A.IOFlag=''入库'' ');
sql.Add(' and exists(SELECT * from [dbo].[F_Tool_SplitString](' + quotedstr(SelCDSKey(CDS_1, ['TISId'])[0]) + ','','') SP where SP.RTValue=A.TISId ) ');
sql.Add(' and exists(SELECT * from [dbo].[F_Tool_SplitString](' + quotedstr(MTISIds) + ','','') SP where SP.RTValue=A.TISId ) ');
sql.Add(' for xml path('''') ) AS VARCHAR(max)) , 2, 8000)');
open;
end;
@ -622,7 +630,30 @@ begin
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson));
JSONObject := TJSONObject.ParseJSONValue(FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson))) as TJSONObject;
if JSONObject.B['succsee'] then
begin
try
ADOCmd.Connection.BeginTrans;
with ADOCmd do
begin
Close;
Sql.Clear;
sql.add('update Trade_ItemizedList_Sub set PrtCount=PrtCount+1');
sql.add('where exists(select * from [dbo].[F_Tool_SplitString](' + quotedstr(MTISIds) + ','','') X where X.RTVALUE=Trade_ItemizedList_Sub.TISId )');
ExecSQL;
end;
ADOCmd.Connection.CommitTrans;
except
ADOCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
end;
end;
end;
procedure TfrmItemizedListInPut.ToolButton2Click(Sender: TObject);
@ -787,6 +818,7 @@ procedure TfrmItemizedListInPut.ToolButton5Click(Sender: TObject);
var
MFiltration: string;
MPrintJson: string;
JSONObject: TJSONObject; // JSONÀà
begin
if FTIMID = '' then
Exit;
@ -810,7 +842,29 @@ begin
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" }, ';
MPrintJson := MPrintJson + ' { "IsSql": false, "Filtration":" ' + MFiltration + '" } ] } ';
FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson));
JSONObject := TJSONObject.ParseJSONValue(FromPrintFr3(Application, PChar(DConString), PChar(MPrintJson))) as TJSONObject;
if JSONObject.B['succsee'] then
begin
try
ADOCmd.Connection.BeginTrans;
with ADOCmd do
begin
Close;
Sql.Clear;
sql.add('update Trade_ItemizedList_Sub set PrtCount=PrtCount+1');
sql.Add(' where TIMID= ' + quotedstr(Trim(FTIMID)));
ExecSQL;
end;
ADOCmd.Connection.CommitTrans;
except
ADOCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
end;
end;
end;
procedure TfrmItemizedListInPut.TechnicsBtnDnClick(Sender: TObject);

View File

@ -3,23 +3,22 @@ inherited frmItemizedListList: TfrmItemizedListList
Top = 13
Caption = #30721#21333#30331#35760
ClientHeight = 736
ClientWidth = 1773
ClientWidth = 1719
Color = clBtnFace
Font.Height = -16
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitLeft = -320
ExplicitTop = -129
ExplicitWidth = 1789
ExplicitHeight = 775
ExplicitLeft = -413
ExplicitWidth = 1727
ExplicitHeight = 767
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1773
Width = 1719
Height = 30
AutoSize = True
ButtonHeight = 30
@ -129,7 +128,7 @@ inherited frmItemizedListList: TfrmItemizedListList
object Panel1: TPanel [1]
Left = 0
Top = 30
Width = 1773
Width = 1719
Height = 91
Align = alTop
BevelInner = bvRaised
@ -169,7 +168,7 @@ inherited frmItemizedListList: TfrmItemizedListList
inline frmFrameDateSel1: TfrmFrameDateSel
Left = 2
Top = 2
Width = 1769
Width = 1715
Height = 37
Align = alTop
Color = clWhite
@ -178,7 +177,7 @@ inherited frmItemizedListList: TfrmItemizedListList
TabOrder = 2
ExplicitLeft = 2
ExplicitTop = 2
ExplicitWidth = 1769
ExplicitWidth = 1715
ExplicitHeight = 37
inherited lbl2: TLabel
Width = 16
@ -191,7 +190,7 @@ inherited frmItemizedListList: TfrmItemizedListList
object cxTabControl1: TcxTabControl [2]
Left = 0
Top = 121
Width = 1773
Width = 1719
Height = 31
Align = alTop
TabOrder = 2
@ -204,7 +203,7 @@ inherited frmItemizedListList: TfrmItemizedListList
' '#20840#37096' ')
OnChange = cxTabControl1Change
ClientRectBottom = 31
ClientRectRight = 1773
ClientRectRight = 1719
ClientRectTop = 28
end
inherited loadProcess: TPanel
@ -225,17 +224,16 @@ inherited frmItemizedListList: TfrmItemizedListList
object cxGrid1: TcxGrid [5]
Left = 0
Top = 152
Width = 1773
Width = 1719
Height = 584
Align = alClient
TabOrder = 5
ExplicitLeft = -152
ExplicitTop = 158
ExplicitHeight = 576
object TV1: TcxGridDBTableView
OnDblClick = TV1DblClick
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCustomDrawCell = TV1CustomDrawCell
DataController.DataSource = DataSource1
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
@ -445,6 +443,14 @@ inherited frmItemizedListList: TfrmItemizedListList
Options.Editing = False
Width = 157
end
object TV1Column14: TcxGridDBColumn
Caption = #25171#21360#27425#25968
DataBinding.FieldName = 'PrtCount'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 77
end
object TV1Column9: TcxGridDBColumn
Caption = #21019#24314#26102#38388
DataBinding.FieldName = 'filltime'

View File

@ -83,6 +83,7 @@ type
TV1Column11: TcxGridDBColumn;
TV1Column12: TcxGridDBColumn;
TV1Column13: TcxGridDBColumn;
TV1Column14: TcxGridDBColumn;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
@ -115,6 +116,7 @@ type
procedure N2Click(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure TV1DblClick(Sender: TObject);
procedure TV1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
private
DQdate: TDateTime;
procedure InitGrid();
@ -549,6 +551,15 @@ begin
Clipboard.SetTextBuf(PChar(Trim(Order_Main.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
end;
procedure TfrmItemizedListList.TV1CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
begin
// µ½Æë
if AViewInfo.GridRecord.Values[TcxGridDBTableView(Sender).GetColumnByFieldName('PrtCount').Index] = 0 then
begin
ACanvas.Brush.Color := $7280FA;
end;
end;
procedure TfrmItemizedListList.TV1DblClick(Sender: TObject);
begin
inherited;

View File

@ -9,8 +9,8 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitWidth = 1297
ExplicitHeight = 529
ExplicitWidth = 1289
ExplicitHeight = 521
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
@ -69,16 +69,24 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
ImageIndex = 5
OnClick = TBDelClick
end
object ToolButton4: TToolButton
object ToolButton5: TToolButton
Left = 355
Top = 0
AutoSize = True
Caption = #22238#21333#24773#20917
ImageIndex = 2
OnClick = ToolButton5Click
end
object ToolButton4: TToolButton
Left = 458
Top = 0
AutoSize = True
Caption = #26631#31614#25171#21360
ImageIndex = 21
OnClick = ToolButton4Click
end
object ToolButton2: TToolButton
Left = 458
Left = 561
Top = 0
AutoSize = True
Caption = #30721#21333#25171#21360
@ -86,7 +94,7 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
OnClick = ToolButton2Click
end
object ToolButton3: TToolButton
Left = 561
Left = 664
Top = 0
AutoSize = True
Caption = #38468#20214
@ -94,7 +102,7 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
OnClick = ToolButton3Click
end
object TBExport: TToolButton
Left = 632
Left = 735
Top = 0
AutoSize = True
Caption = #23548#20986
@ -102,7 +110,7 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
OnClick = TBExportClick
end
object ToolButton1: TToolButton
Left = 703
Left = 806
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
@ -110,7 +118,7 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
OnClick = ToolButton1Click
end
object TBClose: TToolButton
Left = 806
Left = 909
Top = 0
AutoSize = True
Caption = #20851#38381
@ -129,7 +137,6 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
ParentBackground = False
ParentColor = True
TabOrder = 3
ExplicitWidth = 1597
object Label3: TLabel
Left = 261
Top = 46
@ -275,7 +282,7 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
TabOrder = 7
ExplicitLeft = 2
ExplicitTop = 2
ExplicitWidth = 1593
ExplicitWidth = 1277
DesignSize = (
1277
36)
@ -351,17 +358,12 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
Properties.CustomButtons.Buttons = <>
Properties.Style = 5
OnChange = cxPageControl1Change
ExplicitTop = 89
ExplicitWidth = 1404
ExplicitHeight = 426
ClientRectBottom = 342
ClientRectRight = 1281
ClientRectTop = 32
object cxTabSheet1: TcxTabSheet
Caption = ' '#20135#21697#27719#24635' '
ImageIndex = 0
ExplicitWidth = 1404
ExplicitHeight = 394
object cxGrid2: TcxGrid
Left = 0
Top = 0
@ -370,8 +372,6 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 0
ExplicitWidth = 1404
ExplicitHeight = 394
object TV2: TcxGridDBTableView
OnDblClick = TV2DblClick
Navigator.Buttons.CustomButtons = <>
@ -523,6 +523,13 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
Options.Editing = False
Width = 55
end
object TV2Column3: TcxGridDBColumn
Caption = #22238#21333#24773#20917
DataBinding.FieldName = 'ReceiptType'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 93
end
end
object cxGridLevel1: TcxGridLevel
GridView = TV2
@ -532,8 +539,6 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
object cxTabSheet2: TcxTabSheet
Caption = #20135#21697#26126#32454
ImageIndex = 1
ExplicitWidth = 1597
ExplicitHeight = 255
object cxGrid1: TcxGrid
Left = 0
Top = 0
@ -542,9 +547,6 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 0
ExplicitTop = 8
ExplicitWidth = 1597
ExplicitHeight = 229
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -1025,6 +1027,14 @@ inherited frmTradeClothTotalOutList: TfrmTradeClothTotalOutList
Options.Editing = False
Width = 44
end
object Tv1Column36: TcxGridDBColumn
Caption = #22238#21333#24773#20917
DataBinding.FieldName = 'ReceiptType'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 91
end
object Tv1Column25: TcxGridDBColumn
Caption = #24067#31181
DataBinding.FieldName = 'GC_Name'

View File

@ -141,6 +141,9 @@ type
CDS_2: TClientDataSet;
DS_2: TDataSource;
ADO_2: TADOQuery;
TV2Column3: TcxGridDBColumn;
Tv1Column36: TcxGridDBColumn;
ToolButton5: TToolButton;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
@ -173,6 +176,7 @@ type
procedure ToolButton4Click(Sender: TObject);
procedure cxPageControl1Change(Sender: TObject);
procedure TV2DblClick(Sender: TObject);
procedure ToolButton5Click(Sender: TObject);
private
canshu1, FSTKName, canshu3, canshu4: string;
procedure InitGrid1();
@ -189,7 +193,7 @@ implementation
uses
U_DataLink, U_RTFun, U_TradeTotallClothOutinput, U_AttachmentUpload,
U_LabelPrint, U_PrintLabFun, U_dynamicsDll, U_printPdf;
U_LabelPrint, U_PrintLabFun, U_dynamicsDll, U_printPdf, U_InputReceiptType;
{$R *.dfm}
@ -198,7 +202,7 @@ var
SqlStr: string;
begin
SqlStr := ' select A.BCIONO,A.ToCoName,A.C_Code,C_Name,C_Color,C_ColorNo,C_Degree,C_Pattern,QtyUnit ';
SqlStr := ' select A.ReceiptType,A.BCIONO,A.ToCoName,A.C_Code,C_Name,C_Color,C_ColorNo,C_Degree,C_Pattern,QtyUnit ';
SqlStr := SqlStr + ' ,Pieceint=sum(CEILING(A.Piece)),Qty=sum(Qty),QtyUnit ';
SqlStr := SqlStr + ' from BS_Cloth_IO A ';
@ -208,7 +212,7 @@ begin
SqlStr := SqlStr + ' and ioFlag=''³ö¿â'' ';
if Trim(canshu4) <> '' then
SqlStr := SqlStr + ' and isnull(StkCoName,'''')=''' + Trim(canshu4) + '''';
SqlStr := SqlStr + ' group by A.BCIONO,A.ToCoName,C_Code,C_Name,C_Color,C_ColorNo,C_Degree,C_Pattern,QtyUnit';
SqlStr := SqlStr + ' group by A.ReceiptType,A.BCIONO,A.ToCoName,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');
@ -361,6 +365,47 @@ begin
end;
end;
procedure TfrmTradeClothTotalOutList.ToolButton5Click(Sender: TObject);
var
MBCIONo: string;
begin
case cxPageControl1.ActivePageIndex of
0:
begin
MBCIONo := Trim(CDS_2.fieldbyname('BCIONo').AsString)
end;
1:
begin
MBCIONo := Trim(CDS_1.fieldbyname('BCIONo').AsString)
end;
end;
try
frmInputReceiptType := TfrmInputReceiptType.Create(Application);
with frmInputReceiptType do
begin
if ShowModal = 1 then
begin
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('update BS_Cloth_IO ');
sql.Add(' set ReceiptType=' + quotedstr(frmInputReceiptType.cxComboBox1.Text));
sql.Add(' where BCIONo=' + QuotedStr(Trim(MBCIONo)));
ExecSQL;
end;
Self.InitGrid2();
end;
end;
finally
frmInputReceiptType.Free;
end;
end;
procedure TfrmTradeClothTotalOutList.TV2DblClick(Sender: TObject);
begin
cxPageControl1.ActivePageIndex := 1;

View File

@ -10,8 +10,8 @@ inherited frmTradeTotallClothStkSel: TfrmTradeTotallClothStkSel
Position = poMainFormCenter
WindowState = wsMaximized
OnClose = FormClose
ExplicitWidth = 1282
ExplicitHeight = 529
ExplicitWidth = 1274
ExplicitHeight = 521
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]

View File

@ -1,14 +1,14 @@
inherited frmMachRollMain: TfrmMachRollMain
Caption = #26426#21488#26816#39564
ClientHeight = 851
ClientWidth = 1289
ClientHeight = 661
ClientWidth = 1149
Color = clBtnFace
Font.Charset = ANSI_CHARSET
Font.Height = -16
FormStyle = fsMDIChild
Visible = True
ExplicitWidth = 1305
ExplicitHeight = 890
ExplicitWidth = 1157
ExplicitHeight = 692
PixelsPerInch = 96
TextHeight = 21
object dxLayoutControl_pack: TdxLayoutControl [0]
@ -16,7 +16,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Left = 0
Top = 0
Width = 443
Height = 851
Height = 661
Margins.Left = 0
Margins.Top = 0
Margins.Right = 0
@ -28,6 +28,7 @@ inherited frmMachRollMain: TfrmMachRollMain
OptionsItem.SizableVert = True
OnClick = FrameKeyBoard1SpeedButton1Click
OnDblClick = dxLayoutControl_packDblClick
ExplicitHeight = 851
object Qty: TcxTextEdit
Left = 81
Top = 147
@ -923,17 +924,20 @@ inherited frmMachRollMain: TfrmMachRollMain
object Panel_right: TPanel [1]
Left = 443
Top = 0
Width = 846
Height = 851
Width = 706
Height = 661
Align = alClient
Caption = 'Panel_right'
TabOrder = 4
ExplicitWidth = 846
ExplicitHeight = 851
object ToolBar2: TToolBar
Tag = 1000
Left = 1
Top = 1
Width = 844
Top = 356
Width = 704
Height = 30
Align = alBottom
AutoSize = True
ButtonHeight = 30
ButtonWidth = 131
@ -944,6 +948,8 @@ inherited frmMachRollMain: TfrmMachRollMain
List = True
ShowCaptions = True
TabOrder = 0
ExplicitTop = 1
ExplicitWidth = 844
object ToolButton3: TToolButton
Left = 0
Top = 0
@ -976,7 +982,7 @@ inherited frmMachRollMain: TfrmMachRollMain
OnClick = ToolButton2Click
end
object ToolButton1: TToolButton
Left = 380
Left = 356
Top = 0
AutoSize = True
Caption = #25171#21367#35774#32622
@ -984,7 +990,7 @@ inherited frmMachRollMain: TfrmMachRollMain
OnClick = ToolButton1Click
end
object ToolButton7: TToolButton
Left = 483
Left = 459
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
@ -992,14 +998,14 @@ inherited frmMachRollMain: TfrmMachRollMain
OnClick = ToolButton7Click
end
object Tlog: TToolButton
Left = 586
Left = 562
Top = 0
AutoSize = True
Caption = #26085#24535
ImageIndex = 30
end
object ToolButton8: TToolButton
Left = 657
Left = 633
Top = 0
AutoSize = True
Caption = #20851#38381
@ -1010,11 +1016,13 @@ inherited frmMachRollMain: TfrmMachRollMain
object cxGrid3: TcxGrid
Tag = 9999
Left = 1
Top = 576
Width = 844
Top = 386
Width = 704
Height = 274
Align = alBottom
TabOrder = 1
ExplicitLeft = 3
ExplicitTop = 392
object Tv3: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -1145,49 +1153,171 @@ inherited frmMachRollMain: TfrmMachRollMain
GridView = Tv3
end
end
object cxGrid1: TcxGrid
Tag = 9999
object cxGrid2: TcxGrid
Left = 1
Top = 31
Width = 844
Height = 545
Top = 1
Width = 704
Height = 355
Align = alClient
TabOrder = 2
ExplicitHeight = 154
object TV1: TcxGridDBTableView
ExplicitLeft = 3
ExplicitTop = 0
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCustomDrawCell = Tv3CustomDrawCell
DataController.DataSource = ds_3
DataController.DataSource = DS_2
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = '0'
Position = spFooter
end
item
Format = '0'
Position = spFooter
Column = v1PRTOrderQty
end
item
Format = '0'
Position = spFooter
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
Column = v1PRTOrderQty
end
item
Kind = skSum
Column = TV2Column6
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.FocusCellOnTab = True
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsData.Deleting = False
OptionsSelection.CheckBoxVisibility = [cbvDataRow]
OptionsView.Footer = True
OptionsView.GroupByBox = False
object cxgrdbclmnTV1Column1: TcxGridDBColumn
object cxGridDBColumn1: TcxGridDBColumn
Tag = 99
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
Properties.NullStyle = nssUnchecked
Visible = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Sorting = False
Width = 66
end
object cxgrdbclmnTV1Column2: TcxGridDBColumn
object TV2Column3: TcxGridDBColumn
Caption = #35746#21333#21495
DataBinding.FieldName = 'TMMNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 96
end
object cxgrdbclmnTV1Column3: TcxGridDBColumn
object TV2Column4: TcxGridDBColumn
Caption = #23458#25143
DataBinding.FieldName = 'CustName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 72
end
object cxgrdbclmnTV1Column4: TcxGridDBColumn
object TV2Column1: TcxGridDBColumn
Caption = #20135#21697#32534#21495
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 93
end
object cxgrdbclmnTV1Column5: TcxGridDBColumn
object TV2Column2: TcxGridDBColumn
Caption = #33394#24067#21517#31216
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 91
end
object cxgrdbclmnTV1Column6: TcxGridDBColumn
object v1PRTColor: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 79
end
object TV2Column5: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'C_ColorNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 60
end
object TV2Column7: TcxGridDBColumn
Caption = #35746#21333#25968
DataBinding.FieldName = 'TMSQty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 76
end
object v1PRTOrderQty: TcxGridDBColumn
Caption = #27424#21333#25968
DataBinding.FieldName = 'QDQty'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 84
end
object TV2Column6: TcxGridDBColumn
Caption = #37197#36135#25968#37327
DataBinding.FieldName = 'Qty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 92
end
object v1OrderUnit: TcxGridDBColumn
Caption = #21333#20301
DataBinding.FieldName = 'TMSUnit'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxComboBoxProperties'
Properties.Items.Strings = (
'M'
'Y'
'Kg')
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object cxGridDBColumn7: TcxGridDBColumn
Caption = #22791#27880
DataBinding.FieldName = 'OrdSNote'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
end
object cxGridLevel1: TcxGridLevel
GridView = TV1
GridView = TV2
end
end
end
@ -1296,19 +1426,19 @@ inherited frmMachRollMain: TfrmMachRollMain
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_TradeInsp.ADOLink
Left = 442
Top = 270
Left = 456
Top = 311
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_TradeInsp.ADOLink
Left = 536
Top = 270
Left = 539
Top = 311
end
object cds_params: TClientDataSet
Aggregates = <>
Params = <>
Left = 818
Top = 364
Left = 788
Top = 361
object cds_paramsdabao: TStringField
FieldName = 'dabao'
Size = 10
@ -1406,83 +1536,83 @@ inherited frmMachRollMain: TfrmMachRollMain
object CDS_2: TClientDataSet
Aggregates = <>
Params = <>
Left = 630
Top = 364
Left = 622
Top = 361
end
object DS_2: TDataSource
DataSet = CDS_2
Left = 630
Top = 458
Left = 622
Top = 411
end
object cds_1: TClientDataSet
Aggregates = <>
Params = <>
Left = 536
Top = 364
Left = 539
Top = 361
end
object cds_3: TClientDataSet
Aggregates = <>
Params = <>
Left = 724
Top = 364
Left = 705
Top = 361
end
object ds_3: TDataSource
DataSet = cds_3
Left = 724
Top = 458
Left = 705
Top = 411
end
object ds_1: TDataSource
DataSet = cds_1
Left = 536
Top = 458
Left = 539
Top = 411
end
object ADOQueryMain: TADOQuery
Connection = DataLink_TradeInsp.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 724
Top = 270
Left = 705
Top = 311
end
object ADOQueryPrint: TADOQuery
Connection = DataLink_TradeInsp.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 818
Top = 270
Left = 788
Top = 311
end
object GPM_3: TcxGridPopupMenu
Grid = cxGrid3
PopupMenus = <>
Left = 442
Top = 458
Left = 456
Top = 411
end
object ADOQueryImage: TADOQuery
Connection = DataLink_TradeInsp.ADOLink
LockType = ltReadOnly
CommandTimeout = 300
Parameters = <>
Left = 630
Top = 270
Left = 622
Top = 303
end
object DS_IMAGE: TDataSource
DataSet = ADOQueryImage
Left = 818
Top = 458
Left = 788
Top = 411
end
object ADO_CJ: TADOQuery
Connection = DataLink_TradeInsp.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 442
Top = 364
Left = 456
Top = 361
end
object fRMDB_1: TfrxDBDataset
UserName = 'fRMDB_1'
CloseDataSource = False
DataSet = ADOQueryPrint
BCDToCurrency = False
Left = 1030
Top = 385
Left = 539
Top = 461
end
object frxReport1: TfrxReport
Version = '6.9.12'
@ -1502,8 +1632,8 @@ inherited frmMachRollMain: TfrmMachRollMain
''
'end.')
ShowProgress = False
Left = 989
Top = 425
Left = 788
Top = 461
Datasets = <>
Variables = <>
Style = <>
@ -1530,8 +1660,8 @@ inherited frmMachRollMain: TfrmMachRollMain
DataOnly = False
OpenAfterExport = False
PictureType = gpPNG
Left = 925
Top = 500
Left = 705
Top = 461
end
object frxXLSXExport1: TfrxXLSXExport
UseFileCache = True
@ -1541,23 +1671,30 @@ inherited frmMachRollMain: TfrmMachRollMain
ChunkSize = 0
OpenAfterExport = False
PictureType = gpPNG
Left = 944
Top = 565
Left = 622
Top = 511
end
object frxReportTableObject1: TfrxReportTableObject
Left = 1013
Top = 484
Left = 456
Top = 511
end
object frxOLEObject1: TfrxOLEObject
Left = 1093
Top = 548
Left = 622
Top = 461
end
object frxRichObject1: TfrxRichObject
Left = 1133
Top = 492
Left = 539
Top = 511
end
object frxBarCodeObject1: TfrxBarCodeObject
Left = 1173
Top = 420
Left = 456
Top = 461
end
object ADO_2: TADOQuery
Connection = DataLink_TradeInsp.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 884
Top = 383
end
end

View File

@ -176,15 +176,22 @@ type
frxRichObject1: TfrxRichObject;
frxBarCodeObject1: TfrxBarCodeObject;
ToolButton2: TToolButton;
cxGrid1: TcxGrid;
TV1: TcxGridDBTableView;
cxGrid2: TcxGrid;
TV2: TcxGridDBTableView;
cxGridDBColumn1: TcxGridDBColumn;
TV2Column1: TcxGridDBColumn;
TV2Column2: TcxGridDBColumn;
v1PRTColor: TcxGridDBColumn;
v1PRTOrderQty: TcxGridDBColumn;
v1OrderUnit: TcxGridDBColumn;
cxGridDBColumn7: TcxGridDBColumn;
cxGridLevel1: TcxGridLevel;
cxgrdbclmnTV1Column1: TcxGridDBColumn;
cxgrdbclmnTV1Column2: TcxGridDBColumn;
cxgrdbclmnTV1Column3: TcxGridDBColumn;
cxgrdbclmnTV1Column4: TcxGridDBColumn;
cxgrdbclmnTV1Column5: TcxGridDBColumn;
cxgrdbclmnTV1Column6: TcxGridDBColumn;
TV2Column3: TcxGridDBColumn;
TV2Column4: TcxGridDBColumn;
ADO_2: TADOQuery;
TV2Column5: TcxGridDBColumn;
TV2Column6: TcxGridDBColumn;
TV2Column7: TcxGridDBColumn;
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
@ -202,7 +209,6 @@ type
procedure InputLenPropertiesChange(Sender: TObject);
procedure FrameKeyBoard1SpeedButton_ycClick(Sender: TObject);
procedure dxLayoutItem1CaptionClick(Sender: TObject);
procedure Tv2DblClick(Sender: TObject);
procedure lblRuleConversionPropertiesChange(Sender: TObject);
procedure bt_printmdClick(Sender: TObject);
procedure dxLayoutControl_packDblClick(Sender: TObject);
@ -211,8 +217,7 @@ type
procedure ToolButton2Click(Sender: TObject);
private
FCIID, FCIFName, FWorkshop: string;
FBCIOID, FQtyUnit, FLenUnit: string;
FBCIOID, FC_Code, FC_ColorNo, FQtyUnit, FLenUnit: string;
Faddwet, faddlen: double;
FFtyPCId, FGangNo, FRulePieceNo, FCDUnit: string;
FPieceNo: Integer;
@ -226,7 +231,6 @@ type
fTareType: string;
funitPiecesStr: string; //拼匹
procedure setFocusCtrol(controlName: string);
procedure QuantityConversion();
procedure ClearGlobal();
procedure InitPlan(MSubID: string);
@ -235,21 +239,19 @@ type
procedure SetINIFile();
procedure GetINIFile();
procedure InitJYGrid();
procedure InitGrid2();
procedure OpenCom(DllName: string);
procedure CloseCom(DllName: string);
function SaveData(): Boolean;
procedure PrtData(MCIID: string; againPring: Boolean = false);
procedure BadSpeedButtonClick(Sender: TObject);
procedure setFormCtrol();
procedure On1201(var Message: Tmessage); message 1201; // 电子称
procedure On1301(var Message: Tmessage); message 1301; // 码表
function CheckData(CKType: string): Boolean;
function deletePack(packId: string): boolean;
type
public
fmanage: string;
fFlileFlag: string;
@ -267,6 +269,18 @@ uses
U_LabelPrint, U_TradeClothTotalOutSel;
{$R *.dfm}
procedure TfrmMachRollMain.InitGrid2();
var
SqlStr: string;
begin
SqlStr := ' exec P_Trade_Market_WaitOut ';
SqlStr := SqlStr + ' @C_Code =' + quotedstr(trim(FC_Code));
SqlStr := SqlStr + ' ,@C_ColorNo =' + quotedstr(trim(FC_ColorNo));
InitCDSData(ADO_2, CDS_2, Tv2, SqlStr, '', '');
end;
function TfrmMachRollMain.CheckData(CKType: string): Boolean;
var
mvalue: double;
@ -357,7 +371,7 @@ begin
InputLen.SetFocus;
setFocusCtrol(InputLen.Name);
InitJYGrid();
InitGrid2();
FCIID := '';
finally
BTPrint.Enabled := true;
@ -552,7 +566,8 @@ begin
faddlen := 0;
FPacketCIID := '';
FPacketCount := 0;
FC_ColorNo := '';
FC_Code := '';
end;
procedure TfrmMachRollMain.QuantityConversion();
@ -649,13 +664,13 @@ begin
Color.Text := trim(fieldbyName('C_Color').AsString);
C_Pattern.Text := trim(fieldbyName('C_Pattern').AsString);
FFtyPCId := trim(fieldbyName('FtyPCId').AsString);
FC_Code := trim(fieldbyName('C_Code').AsString);
FC_ColorNo := trim(fieldbyName('C_ColorNo').AsString);
cds_params.Edit;
cds_params.fieldbyName('outPage').value := '√';
cds_params.Post;
// Coefficient.Text := trim(fieldbyName('Coefficient').AsString);
// 转换系数
// lblRuleConversion.ItemIndex := lblRuleConversion.Properties.Items.IndexOf(fieldbyName('RuleConversion').AsString);
@ -844,14 +859,6 @@ begin
end;
procedure TfrmMachRollMain.Tv2DblClick(Sender: TObject);
begin
inherited;
if Application.MessageBox('确定要删除当前病疵记录吗?', '警告信息', 1) = 2 then
exit;
CDS_2.Delete;
end;
procedure TfrmMachRollMain.Tv3CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
begin
if AViewInfo.GridRecord.Values[TcxGridDBTableView(Sender).GetColumnByFieldName('Grade').Index] = '次品' then
@ -989,7 +996,7 @@ begin
Close;
SQL.Clear;
SQL.Add('select A.*');
SQL.Add('from Bs_Cloth_IO A where IOType=''拆匹出库'' and STKID=''' + trim(FBCIOID) + '''');
SQL.Add('from Bs_Cloth_IO A where IOType=''ÏúÊÛ³ö¿â'' and STKID=''' + trim(FBCIOID) + '''');
SQL.Add('order by filltime desc');
Open;
end;
@ -1136,7 +1143,7 @@ begin
ClearGlobal();
InitPlan(edtScan.Text);
InitGrid2();
if trim(OrderNo.Text) <> '' then
InputLen.SetFocus;
cxGroupBox_keys.Visible := false;
@ -1192,15 +1199,17 @@ begin
begin
Close;
sql.Clear;
Sql.Add('exec P_BS_Cloth_Out_Split ');
Sql.Add('exec P_BS_Cloth_Out_Distribution ');
Sql.Add(' @GrossWeight=' + quotedstr(Trim(FloatToStr(MGrossWeight))));
Sql.Add(' ,@Tare=' + quotedstr(Trim(FloatToStr(MTare))));
Sql.Add(' ,@NetWeight=' + quotedstr(Trim(FloatToStr(MNetWeight))));
Sql.Add(' ,@Meter=' + quotedstr(Trim(FloatToStr(MMeter))));
Sql.Add(' ,@Yardage=' + quotedstr(Trim(FloatToStr(MYardage))));
Sql.Add(' ,@StkID=' + quotedstr(Trim(FBCIOID)));
Sql.Add(' ,@TMSId =' + quotedstr(Trim(SelTVKey(Tv2,['TMSId'])[0])));
Sql.Add(' ,@Dcode=' + quotedstr(Trim(Dcode)));
Sql.Add(' ,@DName=' + quotedstr(Trim(DName)));
ShowMessage(sql.Text);
open;
end;

View File

@ -39,7 +39,8 @@ uses
U_printPdf in '..\..\..\public10\ThreeFun\Fun\U_printPdf.pas',
U_TradeMarketList in 'U_TradeMarketList.pas' {frmTradeMarketList},
U_TradeDispatchedList in 'U_TradeDispatchedList.pas' {frmTradeDispatchedList},
U_TradeMarketDisSel in 'U_TradeMarketDisSel.pas' {frmTradeMarketDisSel};
U_TradeMarketDisSel in 'U_TradeMarketDisSel.pas' {frmTradeMarketDisSel},
U_ComContactSel in '..\A00通用窗体\U_ComContactSel.pas' {frmComContactSel};
{$R *.res}

View File

@ -228,6 +228,10 @@
<Form>frmTradeMarketDisSel</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\A00通用窗体\U_ComContactSel.pas">
<Form>frmComContactSel</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>

View File

@ -0,0 +1,5 @@
[ExpressSkins]
Default=1
ShowNotifications=1
Enabled=1
dxSkinsDefaultPainters=1

View File

@ -8,8 +8,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Font.Height = -16
Position = poMainFormCenter
WindowState = wsMaximized
ExplicitWidth = 1376
ExplicitHeight = 691
ExplicitWidth = 1368
ExplicitHeight = 683
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
@ -28,6 +28,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
List = True
ShowCaptions = True
TabOrder = 0
ExplicitTop = 3
object TBSave: TToolButton
Left = 0
Top = 0
@ -54,12 +55,13 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
end
end
object ToolBar2: TToolBar [1]
Tag = 1
Left = 0
Top = 224
Width = 1360
Height = 30
ButtonHeight = 30
ButtonWidth = 99
ButtonWidth = 67
Caption = 'ToolBar1'
EdgeInner = esNone
EdgeOuter = esNone
@ -67,16 +69,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
List = True
ShowCaptions = True
TabOrder = 1
object ToolButton4: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #20135#21697#36873#25321
ImageIndex = 4
OnClick = ToolButton4Click
end
object ToolButton1: TToolButton
Left = 103
Left = 0
Top = 0
AutoSize = True
Caption = #22686#34892
@ -84,20 +78,13 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
OnClick = ToolButton1Click
end
object ToolButton2: TToolButton
Left = 174
Left = 71
Top = 0
AutoSize = True
Caption = #21024#34892
ImageIndex = 6
OnClick = ToolButton2Click
end
object ToolButton5: TToolButton
Left = 245
Top = 0
Caption = #19968#38190#26367#25442
ImageIndex = 17
OnClick = ToolButton3Click
end
end
object Panel2: TPanel [2]
Left = 0
@ -107,7 +94,6 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Align = alClient
Caption = 'Panel2'
TabOrder = 2
ExplicitHeight = 569
object Panel3: TPanel
Left = 1
Top = 1
@ -116,7 +102,6 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Align = alClient
Caption = 'Panel2'
TabOrder = 0
ExplicitHeight = 567
object cxGrid1: TcxGrid
Left = 1
Top = 1
@ -124,8 +109,10 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Height = 394
Align = alClient
TabOrder = 0
ExplicitHeight = 565
ExplicitLeft = -1
ExplicitTop = 5
object Tv1: TcxGridDBTableView
OnMouseDown = Tv1MouseDown
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnFocusedRecordChanged = Tv1FocusedRecordChanged
@ -199,17 +186,29 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
end>
Properties.OnButtonClick = Tv1Column1PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 80
Options.Editing = False
Width = 102
end
object Tv1Column7: TcxGridDBColumn
Caption = #33394#24067#21517#31216
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.KeyFieldNames = 'C_Name'
Properties.ListColumns = <
item
Caption = #21697#21517
HeaderAlignment = taCenter
Width = 64
FieldName = 'C_Name'
end>
Properties.ListSource = DS_PM
Properties.OnEditValueChanged = Tv1Column7PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 80
Width = 125
end
object v1PRTColor: TcxGridDBColumn
Caption = #20013#25991#39068#33394
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
@ -220,8 +219,31 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
end>
Properties.ReadOnly = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 116
end
object Tv1Column12: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'C_ColorNo'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxLookupComboBoxProperties'
Properties.KeyFieldNames = 'C_ColorNo'
Properties.ListColumns = <
item
Caption = #33394#21495
HeaderAlignment = taCenter
FieldName = 'C_ColorNo'
end
item
Caption = #39068#33394
HeaderAlignment = taCenter
FieldName = 'C_Color'
end>
Properties.ListSource = DS_YS
Properties.OnEditValueChanged = Tv1Column12PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 75
end
object Tv1Column9: TcxGridDBColumn
Caption = #35268#26684
DataBinding.FieldName = 'C_Spec'
@ -269,14 +291,9 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Caption = #25968#37327#21333#20301
DataBinding.FieldName = 'TMSUnit'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxComboBoxProperties'
Properties.Items.Strings = (
'M'
'Y'
'Kg'
#21305)
HeaderAlignmentHorz = taCenter
Width = 70
Options.Editing = False
Width = 80
end
object Tv1Column4: TcxGridDBColumn
Caption = #21333#20215
@ -327,7 +344,6 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Align = alRight
Caption = 'Panel4'
TabOrder = 1
ExplicitHeight = 567
object Panel5: TPanel
Left = 1
Top = 1
@ -365,7 +381,6 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Align = alClient
Caption = #21452#20987#21024#38500#26126#32454#20449#24687
TabOrder = 1
ExplicitHeight = 524
object cxGrid2: TcxGrid
Left = 2
Top = 23
@ -373,7 +388,6 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Height = 328
Align = alClient
TabOrder = 0
ExplicitHeight = 499
object TvMX: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
@ -468,7 +482,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Caption = #22791' '#27880
end
object Label2: TLabel
Left = 23
Left = 21
Top = 13
Width = 48
Height = 21
@ -482,7 +496,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Caption = #23458' '#25143
end
object Label20: TLabel
Left = 23
Left = 21
Top = 49
Width = 64
Height = 21
@ -496,7 +510,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Caption = #32852#31995#26041#24335#65306
end
object Label37: TLabel
Left = 23
Left = 21
Top = 87
Width = 80
Height = 21
@ -512,7 +526,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
object TMMNo: TcxTextEdit
Tag = 2
Left = 114
Top = 9
Top = 10
Enabled = False
TabOrder = 0
Width = 200
end
@ -543,7 +558,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
end
object OrdNote: TMemo
Tag = 2
Left = 112
Left = 114
Top = 126
Width = 894
Height = 58
@ -570,8 +585,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
end
object OurCoName: TcxButtonEdit
Tag = 2
Left = 112
Top = 44
Left = 114
Top = 45
Properties.Buttons = <
item
Default = True
@ -587,7 +602,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
object CustName: TcxButtonEdit
Tag = 2
Left = 461
Top = 44
Top = 48
Properties.Buttons = <
item
Default = True
@ -603,7 +618,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
object ShippingAddress: TcxButtonEdit
Tag = 2
Left = 806
Top = 45
Top = 48
Hint = 'ShippingAddress/'#21457#36135#22320#22336
Properties.Buttons = <
item
@ -665,7 +680,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
object ADOCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 592
Left = 632
Top = 389
end
object DS_1: TDataSource
@ -734,4 +749,47 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Left = 1008
Top = 412
end
object ADO_YS: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 775
Top = 188
end
object DS_YS: TDataSource
DataSet = ADO_YS
Left = 803
Top = 388
end
object DS_RCPM: TDataSource
DataSet = ADO_RCPM
Left = 760
Top = 443
end
object ADO_PM: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 643
Top = 188
end
object ADO_RCPM: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 730
Top = 398
end
object DS_PM: TDataSource
DataSet = ADO_PM
Left = 267
Top = 390
end
object ADO_1: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 496
Top = 452
end
end

View File

@ -15,7 +15,8 @@ uses
dxDateRanges, dxBarBuiltInMenu, cxPC, System.ImageList, Vcl.ImgList,
U_BaseInput, cxImage, cxDBEdit, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdExplicitTLSClientServerBase, IdFTP, ShellAPI,
dxScrollbarAnnotations, cxImageList, dxSkinsCore, dxSkinsDefaultPainters;
dxScrollbarAnnotations, cxImageList, dxSkinsCore, dxSkinsDefaultPainters,
cxDBLookupComboBox;
type
TfrmTradeMarketInPut = class(TfrmBaseInput)
@ -35,10 +36,8 @@ type
ADO_I2: TADOQuery;
DS_I2: TDataSource;
ToolBar2: TToolBar;
ToolButton4: TToolButton;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
ToolButton5: TToolButton;
Panel2: TPanel;
Panel3: TPanel;
cxGrid1: TcxGrid;
@ -92,6 +91,14 @@ type
CustName: TcxButtonEdit;
ShippingAddress: TcxButtonEdit;
CONTACT: TcxButtonEdit;
ADO_YS: TADOQuery;
DS_YS: TDataSource;
DS_RCPM: TDataSource;
ADO_PM: TADOQuery;
ADO_RCPM: TADOQuery;
DS_PM: TDataSource;
Tv1Column12: TcxGridDBColumn;
ADO_1: TADOQuery;
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBSaveClick(Sender: TObject);
@ -120,6 +127,9 @@ type
procedure OurCoNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure ShippingAddressPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure CustNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure Tv1Column7PropertiesEditValueChanged(Sender: TObject);
procedure Tv1Column12PropertiesEditValueChanged(Sender: TObject);
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
private
FSCXDH: string;
procedure InitData();
@ -149,7 +159,7 @@ implementation
uses
U_DataLink, U_ZDYHelp, U_ZDYHelpSel, U_RTFun, U_CompanySel, U_PictureUpload,
U_ClothInfoSel;
U_ClothInfoSel, U_ComContactSel;
{$R *.dfm}
@ -224,7 +234,7 @@ begin
SCSHData(ADOTemp, ScrollBox1, 7);
OurCoName.Properties.LookupItems.Text := Trim(ADOTemp.FieldByName('OurCoNo').AsString);
CustName.Properties.LookupItems.Text := Trim(ADOTemp.FieldByName('CustNo').AsString);
with ADOTemp do
with ADO_1 do
begin
Close;
SQL.Clear;
@ -239,8 +249,8 @@ begin
end;
Open;
end;
SCreateCDS(ADOTemp, CDS_1);
SInitCDSData(ADOTemp, CDS_1);
SCreateCDS(ADO_1, CDS_1);
SInitCDSData(ADO_1, CDS_1);
if PState = 0 then
begin
@ -288,6 +298,14 @@ var
i: Integer;
begin
inherited;
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add(' exec P_BS_CloInfo_Hot ');
ExecSQL;
end;
readCxGrid(TRIM(SELF.Caption), Tv1, '生产指示单管理');
TMMNo.Text := '';
fFlileFlag := UserDataFlag + 'HX';
@ -297,11 +315,36 @@ begin
ordtype.ItemIndex := 0;
InitImage1();
InitImage2();
with ADO_PM do
begin
Close;
sql.Clear;
sql.Add(' SELECT C_Code,C_Name,qtyunit FROM Bs_Cloth_Info order by HotQty desc ');
Open;
end;
with ADO_YS do
begin
Close;
sql.Clear;
sql.Add(' SELECT A.C_Code,B.C_Color,B.C_ColorNo FROM Bs_Cloth_Info A inner join BS_Cloth_Info_Sub B on A.BCIID=B.BCIID ');
sql.Add(' where 1=2 ');
Open;
end;
with ADO_RCPM do
begin
Close;
sql.Clear;
sql.Add(' SELECT C_GYSNAME FROM BS_Cloth_Info_GYSCP');
Open;
end;
end;
function TfrmTradeMarketInPut.SaveData(): Boolean;
var
maxno, Smaxno, maxTMMNo, MaxFNo: string;
maxno, Smaxno, maxTMMNo, MaxFNo, MQZ, MTMMNo: string;
begin
try
ADOCmd.Connection.BeginTrans;
@ -310,15 +353,21 @@ begin
begin
if GetLSNo(ADOCmd, maxno, 'JM', 'Trade_Market_Main', 3, 1) = False then
raise Exception.Create('取最大号失败!');
// 大货单编号G50313001<-- G50313 001
//(“G”+ 25年的“5(每过五年辉清一下以前的数据 所以0-9循环)+0313(月日)+001(单号,不会超过999))
MQZ := 'G' + RightStr(Trim(FormatDateTime('yyMMdd', SGetServerDate(ADOTemp))), 5);
if GetLSNo(ADOCmd, MTMMNo, MQZ, 'Trade_Market_Main', 3, 0) = False then
raise Exception.Create('取最大号失败!');
TMMNo.Text := MTMMNo;
end
else
begin
maxno := Trim(FTMMID);
end;
if TMMNo.Text = '' then
TMMNo.Text := maxno;
with ADOCmd do
begin
Close;
@ -383,65 +432,13 @@ begin
RTSetsavedata(ADOCmd, 'Trade_Market_Sub', ScrollBox1, 7);
FieldByName('TMMID').Value := Trim(maxno);
FieldByName('TMSId').Value := Trim(Smaxno);
// FieldByName('ConSId').Value := Trim(CDS_1.fieldbyname('ConSId').AsString);
// FieldByName('ConMId').Value := Trim(CDS_1.fieldbyname('ConMId').AsString);
Post;
with CDS_1 do
begin
Edit;
fieldbyname('TMSId').Value := Trim(Smaxno);
Post;
end;
end;
Next;
end;
end;
///////////////////// 保存子表 ///////////////////////////
///////////////////// 保存加工厂 ///////////////////////////
// with ADOCmd do
// begin
// Close;
// sql.Clear;
// SQL.Add('select * from Trade_Plan_Fty where TPFId=''' + Trim(FTMMID) + '''');
// Open;
// end;
// with ADOCmd do
// begin
// if ADOCmd.IsEmpty then
// begin
// Append;
// end
// else
// Edit;
// RTSetsavedata(ADOCmd, 'Trade_Plan_Fty', ScrollBox1, 5);
// FieldByName('TMMID').Value := Trim(FTMMID);
// FieldByName('TPFId').Value := Trim(FTMMID);
// Post;
// end;
///////////////////// 保存加工厂 ///////////////////////////
///
/////////////// 保存打卷设置 ///////////////
// with ADOCmd do
// begin
// Close;
// sql.Clear;
// SQL.Add('select * from Trade_Cloth_Inspect_Rule where RuleID=''' + Trim(FTMMID) + '''');
// Open;
// end;
// with ADOCmd do
// begin
// if ADOCmd.IsEmpty then
// begin
// Append;
// end
// else
// Edit;
// RTSetsavedata(ADOCmd, 'Trade_Cloth_Inspect_Rule', ScrollBox1, 9);
// FieldByName('RuleID').Value := Trim(FTMMID);
// Post;
// end;
/////////////// 保存打卷设置 ///////////////
with ADOCmd do
begin
@ -453,23 +450,33 @@ begin
if ADOCmd.RecordCount > 1 then
raise Exception.Create('订单号重复!');
FTMMID := Trim(maxno);
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add('select C_Code,C_Color,C_ColorNo,CF=count(TMSID) from Trade_Market_sub where TMMID=''' + Trim(maxno) + '''');
sql.Add('group by C_Code,C_Color,C_ColorNo HAVING count(TMSID)>1 ');
Open;
end;
if not ADOCmd.IsEmpty then
raise Exception.Create('颜色重复!');
FTMMID := Trim(maxno);
ADOCmd.Connection.CommitTrans;
with ADO_1 do
begin
Close;
SQL.Clear;
sql.Add(' select * from Trade_Market_Sub where TMMID=''' + Trim(FTMMID) + '''');
Open;
end;
SCreateCDS(ADO_1, CDS_1);
SInitCDSData(ADO_1, CDS_1);
Result := True;
except
Result := False;
ADOCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
if pos('KEY 约束', Exception(ExceptObject).Message) > 0 then
begin
if GetLSNo(ADOCmd, Smaxno, 'JS', 'Trade_Market_Sub', 4, 1) = False then
begin
Application.MessageBox('重新取子流水号失败!', '提示', 0);
Exit;
end;
end;
end;
end;
@ -477,9 +484,13 @@ procedure TfrmTradeMarketInPut.TBSaveClick(Sender: TObject);
var
MAXNO1: string;
begin
if PState <> 1 then
ToolBar1.SetFocus;
if trim(CustName.Text) = '' then
begin
TMMDate.SetFocus;
Application.MessageBox('客户不能为空!', '提示', 0);
Exit;
end;
if CDS_1.IsEmpty then
@ -500,11 +511,11 @@ begin
Exit;
end;
// if CDS_1.Locate('C_Color', null, []) then
// begin
// Application.MessageBox('颜色不能为空!', '提示', 0);
// Exit;
// end;
if CDS_1.Locate('C_Color', null, []) then
begin
Application.MessageBox('颜色不能为空!', '提示', 0);
Exit;
end;
if SaveData() then
begin
@ -518,11 +529,7 @@ var
i: Integer;
maxno: string;
begin
if Trim(TMMNo.Text) = '' then
begin
Application.MessageBox('订单号不能为空!', '提示', 0);
Exit;
end;
i := cds_1.RecordCount;
i := i + 1;
CopyAddRow(Tv1, cds_1);
@ -636,7 +643,7 @@ begin
FieldByName('SSel').Value := false;
FieldByName('SerialNo').Value := IntToStr(i);
FieldByName('TMSId').Value := Trim(maxno);
FieldByName('TMSUnit').Value := 'M';
FieldByName('TMSUnit').Value := trim(frmClothInfoSel.CDS_1.Fieldbyname('qtyunit').AsString);
Fieldbyname('C_Code').AsString := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Code').AsString);
Fieldbyname('C_Name').AsString := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Name').AsString);
Fieldbyname('C_Spec').AsString := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Spec').AsString);
@ -772,6 +779,8 @@ begin
begin
self.CustName.Properties.LookupItems.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
self.CustName.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAbbrName').AsString);
self.ShippingAddress.Text := Trim(frmCompanySel.CDS_1.fieldbyname('mxaddress').AsString);
self.CONTACT.Text := Trim(frmCompanySel.CDS_1.fieldbyname('PhoneNumber').AsString);
end;
end;
@ -984,25 +993,21 @@ begin
end;
procedure TfrmTradeMarketInPut.ShippingAddressPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
var
fsj: string;
FWZ: Integer;
begin
fsj := Trim(TcxButtonEdit(Sender).Hint);
FWZ := Pos('/', fsj);
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
frmComContactSel := TfrmComContactSel.Create(Application);
with frmComContactSel do
begin
flag := Copy(fsj, 1, FWZ - 1);
flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ);
FCoCode := Trim(self.CustName.Properties.LookupItems.Text);
if ShowModal = 1 then
begin
TcxButtonEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
self.ShippingAddress.Text := Trim(frmComContactSel.CDS_1.fieldbyname('mxaddress').AsString);
self.CONTACT.Text := Trim(frmComContactSel.CDS_1.fieldbyname('PhoneNumber').AsString);
end;
end;
finally
frmZDYHelp.Free;
frmComContactSel.Free;
end;
end;
@ -1110,6 +1115,25 @@ begin
end;
end;
procedure TfrmTradeMarketInPut.Tv1Column12PropertiesEditValueChanged(Sender: TObject);
var
mvalue, FFieldName: string;
begin
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
mvalue := TcxTextEdit(Sender).EditingText;
with CDS_1 do
begin
Edit;
FieldByName(FFieldName).Value := Trim(mvalue);
Post;
ADO_YS.Locate('C_ColorNo', mvalue, []);
Edit;
FieldByName('C_Color').Value := ADO_YS.FieldByName('C_Color').Value;
Post;
end;
end;
procedure TfrmTradeMarketInPut.Tv1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
inherited;
@ -1173,6 +1197,49 @@ begin
end;
end;
procedure TfrmTradeMarketInPut.Tv1Column7PropertiesEditValueChanged(Sender: TObject);
var
mvalue, FFieldName: string;
begin
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
mvalue := TcxTextEdit(Sender).EditingText;
with CDS_1 do
begin
Edit;
FieldByName(FFieldName).Value := Trim(mvalue);
Post;
ADO_PM.Locate('C_Name', mvalue, []);
Edit;
FieldByName('C_Code').Value := ADO_PM.FieldByName('C_Code').Value;
FieldByName('TMSUnit').Value := ADO_PM.FieldByName('qtyunit').Value;
Post;
end;
// with ADOTemp do
// begin
// close;
// sql.Clear;
// sql.Add(' select * from bs_cloth_info a inner join BS_Cloth_Info_GYSCP b on a.bciid=b.bciid ');
// sql.Add('where c_name=' + QuotedStr(CDS_1.FieldByName('C_name').AsString));
// sql.Add('and factoryname=' + QuotedStr(CustName.Text));
//
// open;
// end;
// if ADOTemp.IsEmpty = false then
// begin
// with Self.CDS_1 do
// begin
// edit;
// Fieldbyname('C_GYSNAME').AsString := trim(ADOTemp.Fieldbyname('C_GYSNAME').AsString);
// Post;
// end;
//
// end;
end;
procedure TfrmTradeMarketInPut.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
begin
inherited;
@ -1181,6 +1248,38 @@ begin
InitMXGrid(MTMSId);
end;
procedure TfrmTradeMarketInPut.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
begin
if not ADO_YS.IsEmpty then
begin
if ADO_YS.FieldByName('C_Code').AsString <> CDS_1.FieldByName('C_Code').AsString then
begin
with ADO_YS do
begin
Close;
sql.Clear;
sql.Add(' SELECT A.C_Code,B.C_Color,B.C_ColorNo FROM Bs_Cloth_Info A inner join BS_Cloth_Info_Sub B on A.BCIID=B.BCIID ');
sql.Add(' where A.C_Code= ' + QuotedStr(CDS_1.FieldByName('C_Code').AsString));
Open;
end;
end;
end
else
begin
with ADO_YS do
begin
Close;
sql.Clear;
sql.Add(' SELECT A.C_Code,B.C_Color,B.C_ColorNo FROM Bs_Cloth_Info A inner join BS_Cloth_Info_Sub B on A.BCIID=B.BCIID ');
sql.Add(' where A.C_Code= ' + QuotedStr(CDS_1.FieldByName('C_Code').AsString));
Open;
end;
end;
end;
end;
procedure TfrmTradeMarketInPut.TvMXCellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
begin
inherited;

View File

@ -9,8 +9,8 @@ inherited frmTradeMarketList: TfrmTradeMarketList
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitWidth = 1556
ExplicitHeight = 633
ExplicitWidth = 1548
ExplicitHeight = 625
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
@ -256,7 +256,7 @@ inherited frmTradeMarketList: TfrmTradeMarketList
Align = alClient
PopupMenu = PM_1
TabOrder = 3
ExplicitHeight = 404
ExplicitTop = 154
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -346,7 +346,7 @@ inherited frmTradeMarketList: TfrmTradeMarketList
end
object v1Column11: TcxGridDBColumn
Caption = #21333#20301
DataBinding.FieldName = 'OrdUnit'
DataBinding.FieldName = 'TMSUnit'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
HeaderGlyphAlignmentHorz = taCenter
@ -395,7 +395,6 @@ inherited frmTradeMarketList: TfrmTradeMarketList
Height = 8
HotZoneClassName = 'TcxMediaPlayer9Style'
AlignSplitter = salBottom
ExplicitTop = 556
end
object cxTabControl1: TcxTabControl [4]
Left = 0
@ -427,7 +426,6 @@ inherited frmTradeMarketList: TfrmTradeMarketList
BevelOuter = bvNone
Caption = 'Panel2'
TabOrder = 5
ExplicitTop = 564
object cxGrid2: TcxGrid
Left = 0
Top = 0
@ -436,6 +434,7 @@ inherited frmTradeMarketList: TfrmTradeMarketList
Align = alClient
PopupMenu = PopupMenu2
TabOrder = 0
ExplicitTop = -2
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -541,7 +540,7 @@ inherited frmTradeMarketList: TfrmTradeMarketList
end
object v1OrderUnit: TcxGridDBColumn
Caption = #21333#20301
DataBinding.FieldName = 'OrdUnit'
DataBinding.FieldName = 'TMSUnit'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxComboBoxProperties'
Properties.Items.Strings = (

View File

@ -14,9 +14,9 @@ uses
cxPC, cxSplitter, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdFTP, ShellAPI, cxDropDownEdit, cxCheckBox, RM_e_Graphic, RM_e_Jpeg,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, Math,
dxDateRanges,
IdExplicitTLSClientServerBase, U_BaseList, Vcl.Clipbrd, dxScrollbarAnnotations,
cxProgressBar, FrameDateSel, dxSkinsCore, dxSkinsDefaultPainters;
dxDateRanges, IdExplicitTLSClientServerBase, U_BaseList, Vcl.Clipbrd,
dxScrollbarAnnotations, cxProgressBar, FrameDateSel, dxSkinsCore,
dxSkinsDefaultPainters;
type
TfrmTradeMarketList = class(TfrmBaseList)
@ -143,7 +143,6 @@ type
procedure InitSub();
procedure SetStatus();
procedure InitImage(fwbid: string);
procedure SendMessageQR(MDateId, KeyWord1, KeyWord2, KeyWord3: string);
{ Private declarations }
public
@ -226,25 +225,16 @@ begin
end;
procedure TfrmTradeMarketList.InitSub();
var
SqlStr: string;
begin
ADOQuerySub.Close;
if Order_Main.IsEmpty then
exit;
ADOQuerySub.DisableControls;
with ADOQuerySub do
begin
close;
sql.Clear;
sql.Add('select * ');
sql.Add(' from Trade_Market_Sub A');
sql.Add('where TMMId =' + quotedstr((Order_Main.fieldbyname('TMMId').AsString)));
open;
end;
SCreateCDS(ADOQuerySub, ORDER_SUB);
SInitCDSData(ADOQuerySub, ORDER_SUB);
SqlStr := ' select * from Trade_Market_Sub A';
SqlStr := SqlStr + ' where TMMId =' + quotedstr((Order_Main.fieldbyname('TMMId').AsString));
ADOQuerySub.EnableControls;
TV2.DataController.Filter.Clear;
InitCDSData(ADOQuerySub, ORDER_SUB, Tv2, SqlStr, SGetFilters(Panel1, 1, 2), 'C_Code');
end;
procedure TfrmTradeMarketList.JGTypeChange(Sender: TObject);