产品 检验 仓库
This commit is contained in:
parent
55c827d521
commit
6f6a2fda89
|
|
@ -84,16 +84,32 @@ inherited frmTatClothInfo: TfrmTatClothInfo
|
|||
ImageIndex = 3
|
||||
OnClick = TBMLEditClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
object tbStart: TToolButton
|
||||
Left = 521
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21551#29992
|
||||
ImageIndex = 12
|
||||
OnClick = tbStartClick
|
||||
end
|
||||
object tbPause: TToolButton
|
||||
Left = 592
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26242#20572#20351#29992
|
||||
ImageIndex = 11
|
||||
OnClick = tbPauseClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 687
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 5
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 592
|
||||
Left = 758
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26631#31614#25171#21360
|
||||
|
|
@ -101,7 +117,7 @@ inherited frmTatClothInfo: TfrmTatClothInfo
|
|||
OnClick = ToolButton3Click
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 687
|
||||
Left = 853
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #24037#33402#25171#21360
|
||||
|
|
@ -109,7 +125,7 @@ inherited frmTatClothInfo: TfrmTatClothInfo
|
|||
OnClick = ToolButton4Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 782
|
||||
Left = 948
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
|
|
@ -117,7 +133,7 @@ inherited frmTatClothInfo: TfrmTatClothInfo
|
|||
OnClick = TBExportClick
|
||||
end
|
||||
object TBUP: TToolButton
|
||||
Left = 853
|
||||
Left = 1019
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #22270#29255#19978#20256
|
||||
|
|
@ -125,7 +141,7 @@ inherited frmTatClothInfo: TfrmTatClothInfo
|
|||
OnClick = TBUPClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 948
|
||||
Left = 1114
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
|
|
@ -133,7 +149,7 @@ inherited frmTatClothInfo: TfrmTatClothInfo
|
|||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 1043
|
||||
Left = 1209
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
@ -324,12 +340,14 @@ inherited frmTatClothInfo: TfrmTatClothInfo
|
|||
TabOrder = 4
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 2
|
||||
Top = 42
|
||||
Top = 67
|
||||
Width = 1212
|
||||
Height = 370
|
||||
Height = 345
|
||||
Align = alClient
|
||||
PopupMenu = PM_1
|
||||
TabOrder = 0
|
||||
ExplicitTop = 42
|
||||
ExplicitHeight = 370
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
Navigator.Buttons.Delete.Enabled = False
|
||||
|
|
@ -432,6 +450,22 @@ inherited frmTatClothInfo: TfrmTatClothInfo
|
|||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object Tv1C_LongitudeBatchNo: TcxGridDBColumn
|
||||
Caption = #32463#32433#25209#21495
|
||||
DataBinding.FieldName = 'C_LongitudeBatchNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1C_LatitudeBatchNo: TcxGridDBColumn
|
||||
Caption = #32428#32433#25209#21495
|
||||
DataBinding.FieldName = 'C_LatitudeBatchNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #31576#21495
|
||||
DataBinding.FieldName = 'C_ReedNo'
|
||||
|
|
@ -512,12 +546,13 @@ inherited frmTatClothInfo: TfrmTatClothInfo
|
|||
end
|
||||
object Panel7: TPanel
|
||||
Left = 2
|
||||
Top = 2
|
||||
Top = 27
|
||||
Width = 1212
|
||||
Height = 40
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 1
|
||||
ExplicitTop = 2
|
||||
object Panel4: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
|
|
@ -701,6 +736,24 @@ inherited frmTatClothInfo: TfrmTatClothInfo
|
|||
end
|
||||
end
|
||||
end
|
||||
object cxTabControl1: TcxTabControl
|
||||
Left = 2
|
||||
Top = 2
|
||||
Width = 1212
|
||||
Height = 25
|
||||
Align = alTop
|
||||
TabOrder = 3
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
Properties.TabIndex = 0
|
||||
Properties.Tabs.Strings = (
|
||||
#20840#37096
|
||||
#27491#22312#20351#29992)
|
||||
OnChange = cxTabControl1Change
|
||||
ClientRectBottom = 23
|
||||
ClientRectLeft = 2
|
||||
ClientRectRight = 1210
|
||||
ClientRectTop = 22
|
||||
end
|
||||
end
|
||||
inherited ADOQueryBaseCmd: TADOQuery
|
||||
Connection = DataLink_ClothInfo.ADOLink
|
||||
|
|
|
|||
|
|
@ -122,6 +122,11 @@ type
|
|||
ToolButton4: TToolButton;
|
||||
Tv1C_Color: TcxGridDBColumn;
|
||||
Tv1estimated_diff: TcxGridDBColumn;
|
||||
cxTabControl1: TcxTabControl;
|
||||
tbStart: TToolButton;
|
||||
tbPause: TToolButton;
|
||||
Tv1C_LongitudeBatchNo: TcxGridDBColumn;
|
||||
Tv1C_LatitudeBatchNo: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
|
|
@ -153,6 +158,9 @@ type
|
|||
procedure ToolButton3Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure cxTabControl1Change(Sender: TObject);
|
||||
procedure tbStartClick(Sender: TObject);
|
||||
procedure tbPauseClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
CurrentPage, RecordsNumber: Integer;
|
||||
|
|
@ -264,6 +272,15 @@ begin
|
|||
else
|
||||
fwhere := ' where ' + trim(Pwhere);
|
||||
end;
|
||||
|
||||
if cxTabControl1.TabIndex = 1 then
|
||||
begin
|
||||
if fwhere <> '' then
|
||||
fwhere := fwhere + ' and ISNULL(A.Status,0) = 5 '
|
||||
else
|
||||
fwhere := ' where ISNULL(A.Status,0) = 5 ';
|
||||
end;
|
||||
|
||||
try
|
||||
ADOQueryMain.DisableControls;
|
||||
|
||||
|
|
@ -361,9 +378,15 @@ begin
|
|||
application.ProcessMessages;
|
||||
RecordsNumber := 500;
|
||||
CurrentPage := 1;
|
||||
cxTabControl1.TabIndex := 0;
|
||||
InitTree();
|
||||
SetStatus();
|
||||
InitGrid();
|
||||
tbStart.Visible := True;
|
||||
TBEdit.Visible := True;
|
||||
TBMLEdit.Visible := True;
|
||||
TBDel.Visible := True;
|
||||
tbPause.Visible := False;
|
||||
|
||||
end;
|
||||
|
||||
|
|
@ -378,12 +401,116 @@ begin
|
|||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.cxTabControl1Change(Sender: TObject);
|
||||
var
|
||||
IsAllTab: Boolean;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
IsAllTab := (cxTabControl1.TabIndex = 0);
|
||||
|
||||
tbStart.Visible := IsAllTab;
|
||||
TBEdit.Visible := IsAllTab;
|
||||
TBMLEdit.Visible := IsAllTab;
|
||||
TBDel.Visible := IsAllTab;
|
||||
|
||||
tbPause.Visible := not IsAllTab;
|
||||
|
||||
CurrentPage := 1;
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBRafreshClick(Sender: TObject);
|
||||
begin
|
||||
InitTree();
|
||||
InitGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.tbStartClick(Sender: TObject);
|
||||
var
|
||||
MBCIIDS: string;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
if not CDS_1.Locate('SSel', True, []) then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
MBCIIDS := '';
|
||||
CDS_1.DisableControls;
|
||||
try
|
||||
CDS_1.First;
|
||||
while not CDS_1.Eof do
|
||||
begin
|
||||
if CDS_1.fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
if MBCIIDS <> '' then
|
||||
MBCIIDS := MBCIIDS + ',' + QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString))
|
||||
else
|
||||
MBCIIDS := QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
|
||||
end;
|
||||
CDS_1.Next;
|
||||
end;
|
||||
finally
|
||||
CDS_1.EnableControls;
|
||||
end;
|
||||
|
||||
if MBCIIDS = '' then
|
||||
Exit;
|
||||
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('update BS_Cloth_Info set Status = 5 where BCIID in (' + MBCIIDS + ')');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||
SQL.Add(' ' + QuotedStr(Trim(DName)));
|
||||
SQL.Add(',getdate() ');
|
||||
SQL.Add(',' + QuotedStr(Trim(self.Caption)));
|
||||
SQL.Add(',' + QuotedStr(Trim('开始使用')));
|
||||
SQL.Add(',' + QuotedStr(Trim(MBCIIDS)));
|
||||
SQL.Add(',' + QuotedStr(Trim('成功')));
|
||||
SQL.Add(')');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
|
||||
CDS_1.DisableControls;
|
||||
try
|
||||
CDS_1.First;
|
||||
while not CDS_1.Eof do
|
||||
begin
|
||||
if CDS_1.fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
CDS_1.Edit;
|
||||
CDS_1.fieldbyname('Status').AsInteger := 5;
|
||||
CDS_1.Post;
|
||||
end;
|
||||
CDS_1.Next;
|
||||
end;
|
||||
finally
|
||||
CDS_1.EnableControls;
|
||||
end;
|
||||
|
||||
Application.MessageBox('操作成功!', '提示信息');
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.TBFilterClick(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
|
|
@ -676,6 +803,92 @@ begin
|
|||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.tbPauseClick(Sender: TObject);
|
||||
var
|
||||
MBCIIDS: string;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if CDS_1.IsEmpty then
|
||||
Exit;
|
||||
if not CDS_1.Locate('SSel', True, []) then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
MBCIIDS := '';
|
||||
CDS_1.DisableControls;
|
||||
try
|
||||
CDS_1.First;
|
||||
while not CDS_1.Eof do
|
||||
begin
|
||||
if CDS_1.fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
if MBCIIDS <> '' then
|
||||
MBCIIDS := MBCIIDS + ',' + QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString))
|
||||
else
|
||||
MBCIIDS := QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
|
||||
end;
|
||||
CDS_1.Next;
|
||||
end;
|
||||
finally
|
||||
CDS_1.EnableControls;
|
||||
end;
|
||||
|
||||
if MBCIIDS = '' then
|
||||
Exit;
|
||||
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('update BS_Cloth_Info set Status = 0 where BCIID in (' + MBCIIDS + ')');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
||||
SQL.Add(' ' + QuotedStr(Trim(DName)));
|
||||
SQL.Add(',getdate() ');
|
||||
SQL.Add(',' + QuotedStr(Trim(self.Caption)));
|
||||
SQL.Add(',' + QuotedStr(Trim('暂停使用')));
|
||||
SQL.Add(',' + QuotedStr(Trim(MBCIIDS)));
|
||||
SQL.Add(',' + QuotedStr(Trim('成功')));
|
||||
SQL.Add(')');
|
||||
ExecSQL;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
|
||||
CDS_1.DisableControls;
|
||||
try
|
||||
CDS_1.First;
|
||||
while not CDS_1.Eof do
|
||||
begin
|
||||
if CDS_1.fieldbyname('SSel').AsBoolean then
|
||||
begin
|
||||
CDS_1.Edit;
|
||||
CDS_1.fieldbyname('Status').AsInteger := 0;
|
||||
CDS_1.Post;
|
||||
end;
|
||||
CDS_1.Next;
|
||||
end;
|
||||
finally
|
||||
CDS_1.EnableControls;
|
||||
end;
|
||||
|
||||
Application.MessageBox('操作成功!', '提示信息');
|
||||
initGrid();
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
Application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInfo.N1Click(Sender: TObject);
|
||||
begin
|
||||
SelOKNoFiler(Tv1, True);
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
|
|||
ParentColor = False
|
||||
ParentCtl3D = False
|
||||
TabOrder = 1
|
||||
ExplicitLeft = -8
|
||||
ExplicitTop = 32
|
||||
object Label1: TLabel
|
||||
Left = 31
|
||||
Top = 11
|
||||
|
|
@ -268,6 +270,32 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
|
|||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label14: TLabel
|
||||
Left = 675
|
||||
Top = 130
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #32463#32433#25209#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label16: TLabel
|
||||
Left = 675
|
||||
Top = 156
|
||||
Width = 65
|
||||
Height = 12
|
||||
Caption = #32428#32433#25209#21495#65306
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object C_Code: TEdit
|
||||
Tag = 2
|
||||
Left = 93
|
||||
|
|
@ -474,11 +502,27 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput
|
|||
object estimated_diff: TEdit
|
||||
Tag = 2
|
||||
Left = 738
|
||||
Top = 99
|
||||
Top = 100
|
||||
Width = 120
|
||||
Height = 18
|
||||
TabOrder = 14
|
||||
end
|
||||
object C_LongitudeBatchNo: TEdit
|
||||
Tag = 2
|
||||
Left = 738
|
||||
Top = 128
|
||||
Width = 120
|
||||
Height = 18
|
||||
TabOrder = 15
|
||||
end
|
||||
object C_LatitudeBatchNo: TEdit
|
||||
Tag = 2
|
||||
Left = 738
|
||||
Top = 154
|
||||
Width = 120
|
||||
Height = 18
|
||||
TabOrder = 16
|
||||
end
|
||||
end
|
||||
object cxPageControl3: TcxPageControl
|
||||
Left = 0
|
||||
|
|
|
|||
|
|
@ -219,6 +219,10 @@ type
|
|||
Label11: TLabel;
|
||||
estimated_diff: TEdit;
|
||||
Label13: TLabel;
|
||||
C_LongitudeBatchNo: TEdit;
|
||||
C_LatitudeBatchNo: TEdit;
|
||||
Label14: TLabel;
|
||||
Label16: TLabel;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ begin
|
|||
sql.Clear;
|
||||
sql.Add('select AA.*,row_number () over (order by code) as keyNo from(select DISTINCT C_CODE as code, C_NAME as cname from Bs_CLOTH_INFO ');
|
||||
//sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT C_NAME as name from Bs_CLOTH_INFO ');
|
||||
sql.Add(' WHERE ISNULL(Status,0) = 5 ');
|
||||
if C_NAME.Text <> '' then
|
||||
begin
|
||||
//SQL.Add(' WHERE C_NAME LIKE ' + QUOTEDSTR('%' + C_NAME.Text + '%'));
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ inherited frmTatClothInspList: TfrmTatClothInspList
|
|||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
OnCellDblClick = Tv1CellDblClick
|
||||
OnCustomDrawCell = Tv1CustomDrawCell
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
|
|
@ -263,6 +264,22 @@ inherited frmTatClothInspList: TfrmTatClothInspList
|
|||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1C_LongBatchNo: TcxGridDBColumn
|
||||
Caption = #32463#32433#25209#21495
|
||||
DataBinding.FieldName = 'C_LongBatchNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1C_LatBatchNo: TcxGridDBColumn
|
||||
Caption = #32428#32433#25209#21495
|
||||
DataBinding.FieldName = 'C_LatBatchNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column9: TcxGridDBColumn
|
||||
Caption = #30133#28857#25968#37327
|
||||
DataBinding.FieldName = 'SumCIFNumber'
|
||||
|
|
@ -351,6 +368,38 @@ inherited frmTatClothInspList: TfrmTatClothInspList
|
|||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1code_table_length: TcxGridDBColumn
|
||||
Caption = #30721#34920#38271#24230
|
||||
DataBinding.FieldName = 'code_table_length'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1CalcMeter: TcxGridDBColumn
|
||||
Caption = #35745#31639#31859#25968
|
||||
DataBinding.FieldName = 'CalcMeter'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1EstimatedDiff: TcxGridDBColumn
|
||||
Caption = #39044#35745#24046#20540
|
||||
DataBinding.FieldName = 'EstimatedDiff'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1ActualDiff: TcxGridDBColumn
|
||||
Caption = #23454#38469#24046#20540
|
||||
DataBinding.FieldName = 'ActualDiff'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column20: TcxGridDBColumn
|
||||
Caption = #25171#30721#20154
|
||||
DataBinding.FieldName = 'Filler'
|
||||
|
|
|
|||
|
|
@ -118,6 +118,12 @@ type
|
|||
SpeedButton112: TSpeedButton;
|
||||
SpeedButton110: TSpeedButton;
|
||||
Tv1SumPoints: TcxGridDBColumn;
|
||||
Tv1code_table_length: TcxGridDBColumn;
|
||||
Tv1CalcMeter: TcxGridDBColumn;
|
||||
Tv1EstimatedDiff: TcxGridDBColumn;
|
||||
Tv1ActualDiff: TcxGridDBColumn;
|
||||
Tv1C_LongBatchNo: TcxGridDBColumn;
|
||||
Tv1C_LatBatchNo: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
|
@ -148,6 +154,9 @@ type
|
|||
procedure Button2Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView;
|
||||
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||
var ADone: Boolean);
|
||||
private
|
||||
DQdate: TDateTime;
|
||||
FLeft, FTop: Integer;
|
||||
|
|
@ -776,6 +785,46 @@ begin
|
|||
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInspList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView;
|
||||
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||
var ADone: Boolean);
|
||||
var
|
||||
ATableView: TcxGridDBTableView;
|
||||
AColActual, AColEstimated: TcxGridDBColumn;
|
||||
vActual, vEstimated: Variant;
|
||||
mActual, mEstimated: Double;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if AViewInfo.GridRecord = nil then
|
||||
Exit;
|
||||
if not (Sender is TcxGridDBTableView) then
|
||||
Exit;
|
||||
|
||||
ATableView := TcxGridDBTableView(Sender);
|
||||
|
||||
AColActual := ATableView.GetColumnByFieldName('ActualDiff');
|
||||
AColEstimated := ATableView.GetColumnByFieldName('EstimatedDiff');
|
||||
if (AColActual = nil) or (AColEstimated = nil) then
|
||||
Exit;
|
||||
|
||||
vActual := AViewInfo.GridRecord.Values[AColActual.Index];
|
||||
vEstimated := AViewInfo.GridRecord.Values[AColEstimated.Index];
|
||||
|
||||
if VarIsNull(vActual) or VarIsEmpty(vActual) then
|
||||
Exit;
|
||||
if VarIsNull(vEstimated) or VarIsEmpty(vEstimated) then
|
||||
Exit;
|
||||
|
||||
mActual := StrToFloatDef(VarToStr(vActual), 0);
|
||||
mEstimated := StrToFloatDef(VarToStr(vEstimated), 0);
|
||||
|
||||
if mActual > mEstimated then
|
||||
begin
|
||||
ACanvas.Brush.Color := $00C0C0FF;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothInspList.Tv1CustomDrawIndicatorCell(Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
|
||||
var
|
||||
FValue: string;
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@
|
|||
TabOrder = 2
|
||||
object Panel2: TPanel
|
||||
Left = 1
|
||||
Top = 129
|
||||
Top = 171
|
||||
Width = 487
|
||||
Height = 638
|
||||
Height = 596
|
||||
Align = alClient
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
|
|
@ -500,10 +500,10 @@
|
|||
ItemIndex = 0
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
Text = #30333#29677
|
||||
Text = 'A'#29677
|
||||
Items.Strings = (
|
||||
#30333#29677
|
||||
#22812#29677)
|
||||
'A'#29677
|
||||
'B'#29677)
|
||||
end
|
||||
object SCPerson: TcxButtonEdit
|
||||
Left = 98
|
||||
|
|
@ -871,7 +871,7 @@
|
|||
end
|
||||
object code_table_length: TEdit
|
||||
Left = 98
|
||||
Top = 11
|
||||
Top = 6
|
||||
Width = 114
|
||||
Height = 32
|
||||
Font.Charset = ANSI_CHARSET
|
||||
|
|
@ -887,7 +887,7 @@
|
|||
Left = 1
|
||||
Top = 1
|
||||
Width = 487
|
||||
Height = 128
|
||||
Height = 170
|
||||
Align = alTop
|
||||
Color = clWhite
|
||||
ParentBackground = False
|
||||
|
|
@ -1046,6 +1046,32 @@
|
|||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label58: TLabel
|
||||
Left = 8
|
||||
Top = 134
|
||||
Width = 84
|
||||
Height = 24
|
||||
Caption = #32463#32433#25209#21495
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -20
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label59: TLabel
|
||||
Left = 230
|
||||
Top = 134
|
||||
Width = 84
|
||||
Height = 24
|
||||
Caption = #32428#32433#25209#21495
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -20
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object PCId: TEdit
|
||||
Left = 480
|
||||
Top = 83
|
||||
|
|
@ -1228,6 +1254,38 @@
|
|||
TabOrder = 11
|
||||
OnClick = Button10Click
|
||||
end
|
||||
object C_LongitudeBatchNo: TEdit
|
||||
Left = 98
|
||||
Top = 132
|
||||
Width = 114
|
||||
Height = 32
|
||||
Enabled = False
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -21
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 12
|
||||
OnChange = KZChange
|
||||
end
|
||||
object C_LatitudeBatchNo: TEdit
|
||||
Left = 320
|
||||
Top = 132
|
||||
Width = 122
|
||||
Height = 32
|
||||
Enabled = False
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -21
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 13
|
||||
OnChange = KZChange
|
||||
end
|
||||
end
|
||||
end
|
||||
object ScrollBox1: TScrollBox [1]
|
||||
|
|
@ -2640,6 +2698,30 @@
|
|||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv3CalcMeter: TcxGridDBColumn
|
||||
Caption = #35745#31639#31859#25968
|
||||
DataBinding.FieldName = 'CalcMeter'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv3EstimatedDiff: TcxGridDBColumn
|
||||
Caption = #39044#35745#24046#20540
|
||||
DataBinding.FieldName = 'EstimatedDiff'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv3ActualDiff: TcxGridDBColumn
|
||||
Caption = #23454#38469#24046#20540
|
||||
DataBinding.FieldName = 'ActualDiff'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
end
|
||||
object cxGridLevel2: TcxGridLevel
|
||||
GridView = Tv3
|
||||
|
|
@ -2652,7 +2734,7 @@
|
|||
Height = 193
|
||||
Align = alBottom
|
||||
TabOrder = 1
|
||||
Properties.ActivePage = cxTabSheet1
|
||||
Properties.ActivePage = 查看
|
||||
Properties.CustomButtons.Buttons = <>
|
||||
ClientRectBottom = 191
|
||||
ClientRectLeft = 2
|
||||
|
|
@ -2974,34 +3056,34 @@
|
|||
AutoSize = True
|
||||
Caption = #30133#28857#31649#29702
|
||||
ImageIndex = 2
|
||||
Wrap = True
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
object ToolButton7: TToolButton
|
||||
Left = 237
|
||||
Top = 0
|
||||
Left = 0
|
||||
Top = 38
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 16
|
||||
OnClick = ToolButton7Click
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 332
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 3
|
||||
Wrap = True
|
||||
Visible = False
|
||||
OnClick = ToolButton6Click
|
||||
end
|
||||
object ToolButton8: TToolButton
|
||||
Left = 0
|
||||
Left = 95
|
||||
Top = 38
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = ToolButton8Click
|
||||
end
|
||||
object ToolButton6: TToolButton
|
||||
Left = 166
|
||||
Top = 38
|
||||
AutoSize = True
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 3
|
||||
Visible = False
|
||||
OnClick = ToolButton6Click
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 1
|
||||
|
|
@ -3143,7 +3225,7 @@
|
|||
end
|
||||
object Label19: TLabel
|
||||
Left = 6
|
||||
Top = 224
|
||||
Top = 252
|
||||
Width = 84
|
||||
Height = 23
|
||||
Caption = #31859#25968#20445#30041
|
||||
|
|
@ -3156,7 +3238,7 @@
|
|||
end
|
||||
object Label20: TLabel
|
||||
Left = 161
|
||||
Top = 224
|
||||
Top = 252
|
||||
Width = 21
|
||||
Height = 23
|
||||
Caption = #20301
|
||||
|
|
@ -3168,8 +3250,8 @@
|
|||
ParentFont = False
|
||||
end
|
||||
object Label21: TLabel
|
||||
Left = 6
|
||||
Top = 255
|
||||
Left = 5
|
||||
Top = 286
|
||||
Width = 84
|
||||
Height = 23
|
||||
Caption = #30721#25968#20445#30041
|
||||
|
|
@ -3182,7 +3264,7 @@
|
|||
end
|
||||
object Label27: TLabel
|
||||
Left = 161
|
||||
Top = 255
|
||||
Top = 286
|
||||
Width = 21
|
||||
Height = 23
|
||||
Caption = #20301
|
||||
|
|
@ -3195,7 +3277,7 @@
|
|||
end
|
||||
object Label28: TLabel
|
||||
Left = 161
|
||||
Top = 286
|
||||
Top = 315
|
||||
Width = 21
|
||||
Height = 23
|
||||
Caption = #20301
|
||||
|
|
@ -3208,7 +3290,7 @@
|
|||
end
|
||||
object Label33: TLabel
|
||||
Left = 6
|
||||
Top = 286
|
||||
Top = 318
|
||||
Width = 84
|
||||
Height = 23
|
||||
Caption = #37325#37327#20445#30041
|
||||
|
|
@ -3219,6 +3301,19 @@
|
|||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label57: TLabel
|
||||
Left = 6
|
||||
Top = 215
|
||||
Width = 84
|
||||
Height = 23
|
||||
Caption = #21462#26368#22823#20540
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -20
|
||||
Font.Name = 'Times New Roman'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object edtChen: TEdit
|
||||
Left = 54
|
||||
Top = 52
|
||||
|
|
@ -3372,7 +3467,7 @@
|
|||
end
|
||||
object MPlace: TEdit
|
||||
Left = 92
|
||||
Top = 222
|
||||
Top = 247
|
||||
Width = 63
|
||||
Height = 28
|
||||
Font.Charset = ANSI_CHARSET
|
||||
|
|
@ -3388,7 +3483,7 @@
|
|||
end
|
||||
object YPlace: TEdit
|
||||
Left = 92
|
||||
Top = 253
|
||||
Top = 281
|
||||
Width = 63
|
||||
Height = 28
|
||||
Font.Charset = ANSI_CHARSET
|
||||
|
|
@ -3404,7 +3499,7 @@
|
|||
end
|
||||
object KgPlace: TEdit
|
||||
Left = 92
|
||||
Top = 284
|
||||
Top = 315
|
||||
Width = 63
|
||||
Height = 28
|
||||
Font.Charset = ANSI_CHARSET
|
||||
|
|
@ -3418,6 +3513,23 @@
|
|||
OnExit = MinLenExit
|
||||
OnKeyPress = MJstr3KeyPress
|
||||
end
|
||||
object edtMax: TEdit
|
||||
Left = 96
|
||||
Top = 213
|
||||
Width = 30
|
||||
Height = 28
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -20
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
ReadOnly = True
|
||||
TabOrder = 12
|
||||
Text = #8730
|
||||
OnClick = edtMaxClick
|
||||
OnKeyPress = MJstr3KeyPress
|
||||
end
|
||||
end
|
||||
object Panel3: TPanel [4]
|
||||
Left = 8
|
||||
|
|
|
|||
|
|
@ -336,6 +336,15 @@ type
|
|||
Label56: TLabel;
|
||||
Tv3code_table_length: TcxGridDBColumn;
|
||||
Tv3c_code: TcxGridDBColumn;
|
||||
Tv3CalcMeter: TcxGridDBColumn;
|
||||
Tv3EstimatedDiff: TcxGridDBColumn;
|
||||
Tv3ActualDiff: TcxGridDBColumn;
|
||||
Label57: TLabel;
|
||||
edtMax: TEdit;
|
||||
C_LongitudeBatchNo: TEdit;
|
||||
C_LatitudeBatchNo: TEdit;
|
||||
Label58: TLabel;
|
||||
Label59: TLabel;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
|
|
@ -400,6 +409,7 @@ type
|
|||
procedure weaver_nameClick(Sender: TObject);
|
||||
procedure InputWeightChange(Sender: TObject);
|
||||
procedure KZChange(Sender: TObject);
|
||||
procedure edtMaxClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FCIID, FOperationStatus, FCIFName, FWorkshop: string;
|
||||
|
|
@ -719,6 +729,8 @@ begin
|
|||
code_table_length.Text := '';
|
||||
FLenUnit := '';
|
||||
FLoom := '';
|
||||
C_LongitudeBatchNo.Text := '';
|
||||
C_LatitudeBatchNo.Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmTatMachInsp.LookImage(FileName: string);
|
||||
|
|
@ -1092,6 +1104,8 @@ begin
|
|||
MF.Text := Trim(ADOTmp.FieldByName('C_Width').AsString);
|
||||
KZ.Text := Trim(ADOTmp.FieldByName('C_GramWeight').AsString);
|
||||
SPEC.Text := Trim(ADOTmp.FieldByName('C_SPEC').AsString);
|
||||
C_LongitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LongitudeBatchNo').AsString);
|
||||
C_LatitudeBatchNo.Text := Trim(ADOTmp.FieldByName('C_LatitudeBatchNo').AsString);
|
||||
|
||||
FMainId := '';
|
||||
FSubId := '';
|
||||
|
|
@ -1104,6 +1118,8 @@ begin
|
|||
MF.Text := '';
|
||||
KZ.Text := '';
|
||||
SPEC.Text := '';
|
||||
C_LongitudeBatchNo.Text := '';
|
||||
C_LatitudeBatchNo.Text := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -1234,14 +1250,25 @@ var
|
|||
i1, i2: integer;
|
||||
unitname: string;
|
||||
fdata: double;
|
||||
|
||||
MLen: string;
|
||||
begin
|
||||
i1 := Message.WParam;
|
||||
i2 := Message.LParam;
|
||||
|
||||
if (trim(edtMaBiao.Text) = '√') then
|
||||
begin
|
||||
InputLen.Text := format('%.1f', [i1 / 100000]);
|
||||
code_table_length.Text := InputLen.Text;
|
||||
// InputLen.Text := format('%.1f', [i1 / 100000]);
|
||||
MLen := Format('%.1f', [i1 / 100000]);
|
||||
if Trim(edtMax.Text) = '√' then
|
||||
begin
|
||||
code_table_length.Text := MLen;
|
||||
end
|
||||
else
|
||||
begin
|
||||
InputLen.Text := MLen;
|
||||
code_table_length.Text := MLen;
|
||||
end;
|
||||
end;
|
||||
if (trim(edtMBDW.Text) = '√') then
|
||||
begin
|
||||
|
|
@ -1321,25 +1348,28 @@ begin
|
|||
SQL.Clear;
|
||||
if FMainId <> '' then
|
||||
begin
|
||||
sql.Add('select A.*');
|
||||
sql.Add('from Tat_Cloth_Inspect A '); //where PCId=''' + Trim(FPCId) + '''');
|
||||
|
||||
sql.Add('select A.*,');
|
||||
sql.Add(' ROUND(ISNULL(TRY_CAST(A.GrossWeight AS decimal(18,4)) / NULLIF(TRY_CAST(A.C_GramWeight AS decimal(18,4)), 0), 0), 1) AS CalcMeter,');
|
||||
sql.Add(' ISNULL((select top 1 TRY_CAST(B.estimated_diff AS decimal(18,4)) from Bs_Cloth_Info B where B.c_code = A.c_code), 0) AS EstimatedDiff,');
|
||||
sql.Add(' ROUND(ABS(ISNULL(TRY_CAST(A.GrossWeight AS decimal(18,4)) / NULLIF(TRY_CAST(A.C_GramWeight AS decimal(18,4)), 0), 0) - ISNULL(TRY_CAST(A.code_table_length AS decimal(18,4)), 0)), 1) AS ActualDiff');
|
||||
sql.Add('from Tat_Cloth_Inspect A ');
|
||||
sql.Add('where mainid=' + quotedstr(fmainid));
|
||||
sql.Add('and filler=' + quotedstr(dname));
|
||||
sql.Add('order by filltime desc');
|
||||
end
|
||||
else
|
||||
begin
|
||||
sql.Add('select A.*');
|
||||
sql.Add('from Tat_Cloth_Inspect A '); //where PCId=''' + Trim(FPCId) + '''');
|
||||
sql.Add('select A.*,');
|
||||
sql.Add(' ROUND(ISNULL(TRY_CAST(A.GrossWeight AS decimal(18,4)) / NULLIF(TRY_CAST(A.C_GramWeight AS decimal(18,4)), 0), 0), 1) AS CalcMeter,');
|
||||
sql.Add(' ISNULL((select top 1 TRY_CAST(B.estimated_diff AS decimal(18,4)) from Bs_Cloth_Info B where B.c_code = A.c_code), 0) AS EstimatedDiff,');
|
||||
sql.Add(' ROUND(ABS(ISNULL(TRY_CAST(A.GrossWeight AS decimal(18,4)) / NULLIF(TRY_CAST(A.C_GramWeight AS decimal(18,4)), 0), 0) - ISNULL(TRY_CAST(A.code_table_length AS decimal(18,4)), 0)), 1) AS ActualDiff');
|
||||
sql.Add('from Tat_Cloth_Inspect A ');
|
||||
sql.Add('where convert(varchar(10),filltime,120)=convert(varchar(10),getdate(),120)');
|
||||
sql.Add('and filler=' + quotedstr(dname));
|
||||
sql.Add('and mainid=''无订单''');
|
||||
sql.Add('order by filltime desc');
|
||||
end;
|
||||
|
||||
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_3);
|
||||
|
|
@ -1350,7 +1380,7 @@ begin
|
|||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select COUNT(*)JS,SUM(METER)METER');
|
||||
sql.Add('from Tat_Cloth_Inspect A '); //where PCId=''' + Trim(FPCId) + '''');
|
||||
sql.Add('from Tat_Cloth_Inspect A ');
|
||||
sql.Add('where convert(varchar(10),filltime,120)=convert(varchar(10),getdate(),120)');
|
||||
sql.Add('and filler=' + quotedstr(dname));
|
||||
sql.Add('and mainid=''无订单''');
|
||||
|
|
@ -1361,7 +1391,6 @@ begin
|
|||
LABEL45.Caption := '今日已打匹数:' + ADOTmp.FieldByName('JS').AsString;
|
||||
LABEL44.Caption := '今日已打长度:' + ADOTmp.FieldByName('METER').AsString;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TfrmTatMachInsp.FormShow(Sender: TObject);
|
||||
|
|
@ -1459,6 +1488,7 @@ var
|
|||
maxno, MCIID, strsql: string;
|
||||
MInputLen, MMeter, MYardage: Double;
|
||||
MInputWeight, MGrossWeight, MNetWeight, MTare: Double;
|
||||
MUseLen: Double;
|
||||
begin
|
||||
fmainid := '';
|
||||
fsubid := '';
|
||||
|
|
@ -1512,14 +1542,26 @@ begin
|
|||
///
|
||||
///////////////////////// 保存长度 /////////////////////////
|
||||
MInputLen := RoundFloat(StrToFloatdef(trim(InputLen.Text), 0), 1);
|
||||
|
||||
// 勾选 edtMax 时:取录入长度与码表长度中的较大值参与换算
|
||||
if Trim(edtMax.Text) = '√' then
|
||||
begin
|
||||
if StrToFloatdef(trim(InputLen.Text), 0) >= StrToFloatdef(trim(code_table_length.Text), 0) then
|
||||
MUseLen := StrToFloatdef(trim(InputLen.Text), 0)
|
||||
else
|
||||
MUseLen := StrToFloatdef(trim(code_table_length.Text), 0);
|
||||
end
|
||||
else
|
||||
MUseLen := StrToFloatdef(trim(InputLen.Text), 0);
|
||||
|
||||
if lblLenUnit.Caption = 'M' then
|
||||
begin
|
||||
MMeter := RoundFloat(StrToFloatdef(trim(InputLen.Text), 0), StrTointdef(MPlace.Text, 0));
|
||||
MMeter := RoundFloat(MUseLen, StrTointdef(MPlace.Text, 0));
|
||||
MYardage := RoundFloat(MMeter / 0.9144, StrTointdef(YPlace.Text, 0));
|
||||
end
|
||||
else
|
||||
begin
|
||||
MYardage := RoundFloat((StrToFloatdef(trim(InputLen.Text), 0)), StrTointdef(YPlace.Text, 0));
|
||||
MYardage := RoundFloat(MUseLen, StrTointdef(YPlace.Text, 0));
|
||||
MMeter := RoundFloat(MYardage * 0.9144, StrTointdef(MPlace.Text, 0));
|
||||
end;
|
||||
|
||||
|
|
@ -1560,6 +1602,8 @@ begin
|
|||
FieldByName('PCId').value := FPCId;
|
||||
FieldByName('C_Code').value := trim(code.Text);
|
||||
FieldByName('C_Name').value := trim(codename.Text);
|
||||
FieldByName('C_LongBatchNo').Value := Trim(C_LongitudeBatchNo.Text);
|
||||
FieldByName('C_LatBatchNo').Value := Trim(C_LatitudeBatchNo.Text);
|
||||
|
||||
FieldByName('C_Spec').value := trim(Spec.Text);
|
||||
FieldByName('C_Color').value := FC_Color;
|
||||
|
|
@ -1974,6 +2018,8 @@ begin
|
|||
Self.MF.Text := Self.ADOTmp.FieldByName('C_Width').AsString;
|
||||
Self.KZ.Text := Self.ADOTmp.FieldByName('C_GramWeight').AsString;
|
||||
Self.SPEC.Text := Self.ADOTmp.FieldByName('C_SPEC').AsString;
|
||||
Self.C_LongitudeBatchNo.Text := ADOTmp.fieldbyname('C_LongitudeBatchNo').AsString;
|
||||
Self.C_LatitudeBatchNo.Text := ADOTmp.fieldbyname('C_LatitudeBatchNo').AsString;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
|
|
@ -2404,6 +2450,14 @@ begin
|
|||
SetINIFile();
|
||||
end;
|
||||
|
||||
procedure TfrmTatMachInsp.edtMaxClick(Sender: TObject);
|
||||
begin
|
||||
if Trim(TEdit(Sender).Text) = '' then
|
||||
TEdit(Sender).Text := '√'
|
||||
else
|
||||
TEdit(Sender).Text := '';
|
||||
end;
|
||||
|
||||
procedure TfrmTatMachInsp.edtYJClick(Sender: TObject);
|
||||
begin
|
||||
if Trim(TEdit(Sender).Text) = '' then
|
||||
|
|
|
|||
|
|
@ -179,10 +179,9 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList
|
|||
ParentFont = False
|
||||
PopupMenu = PM_1
|
||||
TabOrder = 2
|
||||
ExplicitLeft = -8
|
||||
ExplicitTop = 145
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
|
|
@ -250,6 +249,7 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList
|
|||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
|
|
@ -260,6 +260,7 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList
|
|||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #21697#21517
|
||||
DataBinding.FieldName = 'C_Name'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -267,6 +268,7 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList
|
|||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #21367#25968
|
||||
DataBinding.FieldName = 'js'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -274,6 +276,7 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList
|
|||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'stkMeter'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -281,6 +284,7 @@ inherited frmTatClothStkHZList: TfrmTatClothStkHZList
|
|||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #30721#25968
|
||||
DataBinding.FieldName = 'StkYardage'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 69
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ uses
|
|||
RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore,
|
||||
dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseList, cxPC,
|
||||
System.StrUtils;
|
||||
System.StrUtils, dxSkinWXI, dxScrollbarAnnotations;
|
||||
|
||||
type
|
||||
TfrmTatClothStkHZList = class(TfrmBaseList)
|
||||
|
|
|
|||
|
|
@ -327,6 +327,22 @@ inherited frmTatClothStkHZListSEL: TfrmTatClothStkHZListSEL
|
|||
HeaderAlignmentHorz = taCenter
|
||||
Width = 69
|
||||
end
|
||||
object Tv1C_LongBatchNo: TcxGridDBColumn
|
||||
Caption = #32463#32433#25209#21495
|
||||
DataBinding.FieldName = 'C_LongBatchNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1C_LatBatchNo: TcxGridDBColumn
|
||||
Caption = #32428#32433#25209#21495
|
||||
DataBinding.FieldName = 'C_LatBatchNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = Tv1
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ type
|
|||
C_code: TEdit;
|
||||
Label1: TLabel;
|
||||
Tv1C_code: TcxGridDBColumn;
|
||||
Tv1C_LongBatchNo: TcxGridDBColumn;
|
||||
Tv1C_LatBatchNo: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
|
|
@ -140,8 +142,8 @@ begin
|
|||
Close;
|
||||
sql.Clear;
|
||||
|
||||
sql.Add('select C_NAME,C_code,COUNT(*)JS,SUM(stkMeter)stkMeter,SUM(StkYardage)StkYardage from V_Tat_Cloth_Stk AA where 1=1 ' + WSql);
|
||||
sql.Add('group by C_NAME,C_code');
|
||||
sql.Add('select C_NAME,C_code,C_LongBatchNo,C_LatBatchNo,COUNT(*)JS,SUM(stkMeter)stkMeter,SUM(StkYardage)StkYardage from V_Tat_Cloth_Stk AA where 1=1 ' + WSql);
|
||||
sql.Add('group by C_NAME,C_code,C_LongBatchNo,C_LatBatchNo');
|
||||
|
||||
// showmessage(sql.text);
|
||||
Open;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
FormStyle = fsMDIChild
|
||||
Position = poScreenCenter
|
||||
Visible = True
|
||||
ExplicitLeft = -689
|
||||
ExplicitTop = -56
|
||||
ExplicitWidth = 1556
|
||||
ExplicitHeight = 639
|
||||
PixelsPerInch = 96
|
||||
|
|
@ -451,8 +449,11 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
ParentFont = False
|
||||
PopupMenu = PM_1
|
||||
TabOrder = 3
|
||||
ExplicitTop = 133
|
||||
object Tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
OnCustomDrawCell = Tv1CustomDrawCell
|
||||
DataController.DataSource = DS_1
|
||||
DataController.Filter.AutoDataSetFilter = True
|
||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||
|
|
@ -524,6 +525,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column22: TcxGridDBColumn
|
||||
Caption = #36873#25321
|
||||
DataBinding.FieldName = 'SSel'
|
||||
DataBinding.IsNullValueType = True
|
||||
PropertiesClassName = 'TcxCheckBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
Properties.NullStyle = nssUnchecked
|
||||
|
|
@ -534,6 +536,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column21: TcxGridDBColumn
|
||||
Caption = #20837#24211#26102#38388
|
||||
DataBinding.FieldName = 'IOTime'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 103
|
||||
|
|
@ -541,6 +544,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column32: TcxGridDBColumn
|
||||
Caption = #21512#21516#21495
|
||||
DataBinding.FieldName = 'conNO'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 76
|
||||
|
|
@ -548,6 +552,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column1: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333#21495
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 78
|
||||
|
|
@ -555,6 +560,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object Tv1Column4: TcxGridDBColumn
|
||||
Caption = #20135#21697#32534#21495
|
||||
DataBinding.FieldName = 'C_Code'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 74
|
||||
|
|
@ -562,6 +568,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column13: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'C_Name'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -569,13 +576,31 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column4: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'C_Color'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1C_LongBatchNo: TcxGridDBColumn
|
||||
Caption = #32463#32433#25209#21495
|
||||
DataBinding.FieldName = 'C_LongBatchNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1C_LatBatchNo: TcxGridDBColumn
|
||||
Caption = #32428#32433#25209#21495
|
||||
DataBinding.FieldName = 'C_LatBatchNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object v1Column18: TcxGridDBColumn
|
||||
Caption = #21345#21495
|
||||
DataBinding.FieldName = 'PCId'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -583,6 +608,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column23: TcxGridDBColumn
|
||||
Caption = #21367#21495
|
||||
DataBinding.FieldName = 'PieceNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -590,6 +616,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column8: TcxGridDBColumn
|
||||
Caption = #27611#37325
|
||||
DataBinding.FieldName = 'GrossWeight'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -597,6 +624,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column27: TcxGridDBColumn
|
||||
Caption = #30382#37325
|
||||
DataBinding.FieldName = 'Tare'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -604,6 +632,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column28: TcxGridDBColumn
|
||||
Caption = #20928#37325
|
||||
DataBinding.FieldName = 'NetWeight'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -611,23 +640,43 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column10: TcxGridDBColumn
|
||||
Caption = #31859#25968
|
||||
DataBinding.FieldName = 'Meter'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
end
|
||||
object Tv1EstimatedDiff: TcxGridDBColumn
|
||||
Caption = #39044#35745#24046#20540
|
||||
DataBinding.FieldName = 'EstimatedDiff'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1ActualDiff: TcxGridDBColumn
|
||||
Caption = #23454#38469#24046#20540
|
||||
DataBinding.FieldName = 'ActualDiff'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 80
|
||||
end
|
||||
object Tv1Column9: TcxGridDBColumn
|
||||
Caption = #20837#24211#26102#38388
|
||||
DataBinding.FieldName = 'IOTime'
|
||||
DataBinding.IsNullValueType = True
|
||||
Options.Editing = False
|
||||
end
|
||||
object Tv1Column11: TcxGridDBColumn
|
||||
Caption = #20837#24211#31867#22411
|
||||
DataBinding.FieldName = 'IOType'
|
||||
DataBinding.IsNullValueType = True
|
||||
Options.Editing = False
|
||||
end
|
||||
object Tv1Column12: TcxGridDBColumn
|
||||
Caption = #24211#20301
|
||||
DataBinding.FieldName = 'IOPosition'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 71
|
||||
|
|
@ -635,6 +684,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object Tv1Column10: TcxGridDBColumn
|
||||
Caption = #30721#25968
|
||||
DataBinding.FieldName = 'Yardage'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -642,6 +692,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column12: TcxGridDBColumn
|
||||
Caption = #21697#36136
|
||||
DataBinding.FieldName = 'Grade'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -649,6 +700,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column42: TcxGridDBColumn
|
||||
Caption = #24635#35760#24405#25968
|
||||
DataBinding.FieldName = 'TotalCount'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -656,6 +708,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column6: TcxGridDBColumn
|
||||
Caption = #21367#26465#30721
|
||||
DataBinding.FieldName = 'CIID'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -663,6 +716,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object Tv1Column7: TcxGridDBColumn
|
||||
Caption = #23458#25143#33457#22411
|
||||
DataBinding.FieldName = 'C_CustPattern'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -670,6 +724,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column3: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'C_Width'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -677,6 +732,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column5: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'C_GramWeight'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -684,6 +740,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column34: TcxGridDBColumn
|
||||
Caption = #32568#26465#30721
|
||||
DataBinding.FieldName = 'BCIOID'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -691,6 +748,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column40: TcxGridDBColumn
|
||||
Caption = #33457#22411
|
||||
DataBinding.FieldName = 'C_Pattern'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -698,6 +756,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object v1Column46: TcxGridDBColumn
|
||||
Caption = #26816#39564#26426#21488
|
||||
DataBinding.FieldName = 'CIMachNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -705,6 +764,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object Tv1Column5: TcxGridDBColumn
|
||||
Caption = #26816#39564#24037
|
||||
DataBinding.FieldName = 'jyg'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -712,12 +772,14 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object VC_BaoID: TcxGridDBColumn
|
||||
Caption = #21253#26465#30721
|
||||
DataBinding.FieldName = 'PacketId'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
end
|
||||
object Tv1Column8: TcxGridDBColumn
|
||||
Caption = #23458#25143#21333#21495
|
||||
DataBinding.FieldName = 'BuyConNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -725,6 +787,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object Tv1Column3: TcxGridDBColumn
|
||||
Caption = #33394#21495
|
||||
DataBinding.FieldName = 'C_ColorNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -732,6 +795,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object Tv1Column6: TcxGridDBColumn
|
||||
Caption = #23436#25104#24230
|
||||
DataBinding.FieldName = 'ClothDegree'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -739,6 +803,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object Tv1Column1: TcxGridDBColumn
|
||||
Caption = #27454#21495
|
||||
DataBinding.FieldName = 'C_StyleNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
@ -746,6 +811,7 @@ inherited frmTatClothStkList: TfrmTatClothStkList
|
|||
object Tv1Column2: TcxGridDBColumn
|
||||
Caption = #33521#25991#39068#33394
|
||||
DataBinding.FieldName = 'C_EColor'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 66
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ uses
|
|||
RM_System, RM_GridReport, Menus, cxCalendar, MovePanel, Math, Clipbrd,
|
||||
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxTextEdit, dxSkinsCore,
|
||||
dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, U_BaseList, cxPC,
|
||||
System.StrUtils;
|
||||
System.StrUtils, dxSkinWXI, dxScrollbarAnnotations;
|
||||
|
||||
type
|
||||
TfrmTatClothStkList = class(TfrmBaseList)
|
||||
|
|
@ -96,6 +96,10 @@ type
|
|||
PM_1: TPopupMenu;
|
||||
PM11: TMenuItem;
|
||||
N1: TMenuItem;
|
||||
Tv1EstimatedDiff: TcxGridDBColumn;
|
||||
Tv1ActualDiff: TcxGridDBColumn;
|
||||
Tv1C_LongBatchNo: TcxGridDBColumn;
|
||||
Tv1C_LatBatchNo: TcxGridDBColumn;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
|
|
@ -117,6 +121,9 @@ type
|
|||
procedure ToolButton4Click(Sender: TObject);
|
||||
procedure PM11Click(Sender: TObject);
|
||||
procedure N1Click(Sender: TObject);
|
||||
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView;
|
||||
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||
var ADone: Boolean);
|
||||
private
|
||||
CurrentPage, RecordsNumber: Integer;
|
||||
lstCust: TStringList;
|
||||
|
|
@ -266,6 +273,35 @@ begin
|
|||
SelOKNo(CDS_1, false);
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothStkList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView;
|
||||
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||
var ADone: Boolean);
|
||||
var
|
||||
vActual, vEstimated: Variant;
|
||||
mActual, mEstimated: Double;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
if AViewInfo.GridRecord = nil then
|
||||
Exit;
|
||||
|
||||
vActual := AViewInfo.GridRecord.Values[Tv1ActualDiff.Index];
|
||||
vEstimated := AViewInfo.GridRecord.Values[Tv1EstimatedDiff.Index];
|
||||
|
||||
if VarIsNull(vActual) or VarIsEmpty(vActual) then
|
||||
Exit;
|
||||
if VarIsNull(vEstimated) or VarIsEmpty(vEstimated) then
|
||||
Exit;
|
||||
|
||||
mActual := StrToFloatDef(VarToStr(vActual), 0);
|
||||
mEstimated := StrToFloatDef(VarToStr(vEstimated), 0);
|
||||
|
||||
if mActual > mEstimated then
|
||||
begin
|
||||
ACanvas.Brush.Color := $00C0C0FF;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmTatClothStkList.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string);
|
||||
begin
|
||||
lstCust.Clear;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user