产品信息两个问题
This commit is contained in:
parent
9fc66583db
commit
b70e1519bb
|
|
@ -10,7 +10,6 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitLeft = -349
|
||||
ExplicitWidth = 1556
|
||||
ExplicitHeight = 884
|
||||
PixelsPerInch = 96
|
||||
|
|
@ -23,7 +22,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
Height = 30
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 99
|
||||
ButtonWidth = 83
|
||||
Caption = 'ToolBar1'
|
||||
DisabledImages = DataLink_ClothInfo.cxImageList_bar
|
||||
Images = DataLink_ClothInfo.cxImageList_bar
|
||||
|
|
@ -39,7 +38,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBRafreshClick
|
||||
end
|
||||
object TBAdd: TToolButton
|
||||
Left = 71
|
||||
Left = 63
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26032#22686
|
||||
|
|
@ -47,7 +46,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBAddClick
|
||||
end
|
||||
object TBCopy: TToolButton
|
||||
Left = 142
|
||||
Left = 126
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22797#21046
|
||||
|
|
@ -55,7 +54,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBCopyClick
|
||||
end
|
||||
object TBEdit: TToolButton
|
||||
Left = 213
|
||||
Left = 189
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
|
|
@ -63,7 +62,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBEditClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 284
|
||||
Left = 252
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26597#30475
|
||||
|
|
@ -71,15 +70,31 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBMLEdit: TToolButton
|
||||
Left = 355
|
||||
Left = 315
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #30446#24405#20462#25913
|
||||
ImageIndex = 3
|
||||
OnClick = TBMLEditClick
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 402
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #35774#20026#28909#38144
|
||||
ImageIndex = 3
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
object ToolButton9: TToolButton
|
||||
Left = 489
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21462#28040#28909#38144
|
||||
ImageIndex = 3
|
||||
OnClick = ToolButton9Click
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 458
|
||||
Left = 576
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
|
|
@ -87,15 +102,23 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 529
|
||||
Left = 639
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26631#31614#25171#21360
|
||||
ImageIndex = 21
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 726
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25209#37327#23548#20986
|
||||
ImageIndex = 21
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 632
|
||||
Left = 813
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20837
|
||||
|
|
@ -103,7 +126,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 703
|
||||
Left = 876
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
|
|
@ -111,7 +134,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBExportClick
|
||||
end
|
||||
object TBUP: TToolButton
|
||||
Left = 774
|
||||
Left = 939
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22270#29255#19978#20256
|
||||
|
|
@ -119,7 +142,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = TBUPClick
|
||||
end
|
||||
object ToolButton5: TToolButton
|
||||
Left = 877
|
||||
Left = 1026
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25805#20316#26085#24535
|
||||
|
|
@ -127,7 +150,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = ToolButton5Click
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 980
|
||||
Left = 1113
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913#21382#21490
|
||||
|
|
@ -135,7 +158,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = ToolButton6Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 1083
|
||||
Left = 1200
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
|
|
@ -143,7 +166,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 1186
|
||||
Left = 1287
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
@ -516,6 +539,8 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
Align = alBottom
|
||||
Caption = 'Panel9'
|
||||
TabOrder = 1
|
||||
ExplicitLeft = -267
|
||||
ExplicitTop = 512
|
||||
object Panel10: TPanel
|
||||
Left = 1
|
||||
Top = 1
|
||||
|
|
@ -553,6 +578,7 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
Align = alClient
|
||||
PopupMenu = PM_1
|
||||
TabOrder = 2
|
||||
ExplicitLeft = 9
|
||||
object Tv1: TcxGridDBTableView
|
||||
OnMouseDown = Tv1MouseDown
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
|
|
@ -586,6 +612,13 @@ inherited frmClothInfo: TfrmClothInfo
|
|||
Options.Editing = False
|
||||
Width = 70
|
||||
end
|
||||
object Tv1Column11: TcxGridDBColumn
|
||||
Caption = #28909#38144#27454
|
||||
DataBinding.FieldName = 'isrx'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 76
|
||||
end
|
||||
object v1CYNo: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
|
|
|
|||
|
|
@ -151,6 +151,10 @@ type
|
|||
cxGridLevel2: TcxGridLevel;
|
||||
cxSplitter2: TcxSplitter;
|
||||
cxSplitter3: TcxSplitter;
|
||||
ToolButton7: TToolButton;
|
||||
Tv1Column11: TcxGridDBColumn;
|
||||
ToolButton8: TToolButton;
|
||||
ToolButton9: TToolButton;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
|
|
@ -184,6 +188,9 @@ type
|
|||
procedure ToolButton5Click(Sender: TObject);
|
||||
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure ToolButton6Click(Sender: TObject);
|
||||
procedure ToolButton7Click(Sender: TObject);
|
||||
procedure ToolButton8Click(Sender: TObject);
|
||||
procedure ToolButton9Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
CurrentPage, RecordsNumber: Integer;
|
||||
|
|
@ -979,6 +986,150 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmClothInfo.ToolButton7Click(Sender: TObject);
|
||||
var
|
||||
WSql: string;
|
||||
begin
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
Tv1.OnFocusedRecordChanged := nil;
|
||||
if CDS_1.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
// Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
WSql := '';
|
||||
CDS_1.DisableControls;
|
||||
|
||||
with CDS_1 do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if CDS_1.fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
if WSql <> '' then
|
||||
begin
|
||||
WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
|
||||
end
|
||||
else
|
||||
begin
|
||||
WSql := QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
|
||||
end;
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
|
||||
CDS_1.Locate('SSel', True, []);
|
||||
// Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
|
||||
CDS_1.EnableControls;
|
||||
|
||||
try
|
||||
frmLabelPrint := TfrmLabelPrint.Create(Application);
|
||||
with frmLabelPrint do
|
||||
begin
|
||||
FLMType := 'ClothInfoPrint2';
|
||||
FFiltration1 := WSql;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
// Self.InitGrid();
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmLabelPrint.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
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.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
InitImage();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user