From 1d091919bd9e730877b3d19d2ecdfc99c7294887 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Cddf=E2=80=9D?= <“ddf668490@163.com”>
Date: Thu, 20 Feb 2025 17:32:25 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8B=86=E5=8C=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
T02贸易汇总仓库/U_ItemizedListQtyInPut.dfm | 5 -
T02贸易汇总仓库/U_ItemizedListQtyInPut.pas | 2 +-
T03贸易布匹检验/DjdMachineInsp.dproj | 2 +-
T03贸易布匹检验/U_MachRollMain.dfm | 235 +---
T03贸易布匹检验/U_MachRollMain.pas | 1417 ++------------------
5 files changed, 183 insertions(+), 1478 deletions(-)
diff --git a/T02贸易汇总仓库/U_ItemizedListQtyInPut.dfm b/T02贸易汇总仓库/U_ItemizedListQtyInPut.dfm
index ed9d8b2..af1896e 100644
--- a/T02贸易汇总仓库/U_ItemizedListQtyInPut.dfm
+++ b/T02贸易汇总仓库/U_ItemizedListQtyInPut.dfm
@@ -20,8 +20,6 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
Align = alClient
Caption = 'pnl1'
TabOrder = 0
- ExplicitWidth = 595
- ExplicitHeight = 525
object cxGrid1: TcxGrid
Tag = 2
Left = 1
@@ -31,8 +29,6 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 0
- ExplicitLeft = 2
- ExplicitTop = 73
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@@ -199,7 +195,6 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
Height = 41
Align = alTop
TabOrder = 2
- ExplicitWidth = 593
object Label9: TLabel
Left = 33
Top = 7
diff --git a/T02贸易汇总仓库/U_ItemizedListQtyInPut.pas b/T02贸易汇总仓库/U_ItemizedListQtyInPut.pas
index 7d2c62a..4cd97f6 100644
--- a/T02贸易汇总仓库/U_ItemizedListQtyInPut.pas
+++ b/T02贸易汇总仓库/U_ItemizedListQtyInPut.pas
@@ -436,7 +436,7 @@ begin
FieldByName('EditTime').Value := SGetServerDate(ADOQueryTemp);
end;
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_Sub, 'BS_Cloth_IO', 0);
- FieldByName('STKName').Value := 'ƥֿ';
+ FieldByName('STKName').Value := 'óײƥ';
FieldByName('IOFlag').Value := '';
FieldByName('IOQtyFlag').Value := 1;
FieldByName('Piece').Value := 1;
diff --git a/T03贸易布匹检验/DjdMachineInsp.dproj b/T03贸易布匹检验/DjdMachineInsp.dproj
index 7e3172f..cacb3fa 100644
--- a/T03贸易布匹检验/DjdMachineInsp.dproj
+++ b/T03贸易布匹检验/DjdMachineInsp.dproj
@@ -161,7 +161,7 @@
CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)
- D:\Dp10RepoV1\项目代码\D10myLvsheng\T03贸易布匹检验\testDll.exe
+ D:\Dp10RepoV1\项目代码\D10xhGemei\T03贸易布匹检验\testDll.exe
diff --git a/T03贸易布匹检验/U_MachRollMain.dfm b/T03贸易布匹检验/U_MachRollMain.dfm
index c1b68ea..d0c25e4 100644
--- a/T03贸易布匹检验/U_MachRollMain.dfm
+++ b/T03贸易布匹检验/U_MachRollMain.dfm
@@ -27,16 +27,8 @@ inherited frmMachRollMain: TfrmMachRollMain
OptionsItem.SizableHorz = True
OptionsItem.SizableVert = True
OnDblClick = dxLayoutControl_packDblClick
- ExplicitHeight = 791
- object Piece: TcxTextEdit
- Left = 239
- Top = 154
- Properties.ReadOnly = True
- Style.HotTrack = False
- Style.TransparentBorder = False
- TabOrder = 8
- Width = 161
- end
+ ExplicitLeft = 5
+ ExplicitTop = -5
object Qty: TcxTextEdit
Left = 79
Top = 154
@@ -110,30 +102,30 @@ inherited frmMachRollMain: TfrmMachRollMain
Properties.OnChange = InputLenPropertiesChange
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 9
+ TabOrder = 8
OnClick = edtScanEnter
OnKeyPress = InputLenKeyPress
- Height = 38
+ Height = 35
Width = 132
end
object BTPrint: TButton
Left = 259
- Top = 256
- Width = 140
+ Top = 253
+ Width = 120
Height = 59
Caption = #25552' '#20132
- TabOrder = 13
+ TabOrder = 11
OnClick = BTPrintClick
end
object Tare: TcxTextEdit
Tag = 999
Left = 158
- Top = 256
+ Top = 253
AutoSize = False
Properties.OnChange = InputLenPropertiesChange
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 12
+ TabOrder = 10
OnClick = edtScanEnter
OnKeyPress = InputLenKeyPress
Height = 59
@@ -142,12 +134,12 @@ inherited frmMachRollMain: TfrmMachRollMain
object Coefficient: TcxTextEdit
Tag = 999
Left = 79
- Top = 324
+ Top = 321
AutoSize = False
Properties.ReadOnly = False
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 14
+ TabOrder = 12
OnClick = edtScanEnter
OnKeyPress = InputLenKeyPress
Height = 37
@@ -156,12 +148,12 @@ inherited frmMachRollMain: TfrmMachRollMain
object InputWeight: TcxTextEdit
Tag = 999
Left = 79
- Top = 256
+ Top = 253
AutoSize = False
Properties.OnChange = InputLenPropertiesChange
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 11
+ TabOrder = 9
OnClick = edtScanEnter
OnKeyPress = InputLenKeyPress
Height = 59
@@ -174,7 +166,7 @@ inherited frmMachRollMain: TfrmMachRollMain
AutoSize = False
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 18
+ TabOrder = 16
Visible = False
OnClick = edtScanEnter
OnKeyPress = InputLenKeyPress
@@ -183,12 +175,12 @@ inherited frmMachRollMain: TfrmMachRollMain
end
object AOrdDefNote1: TcxRichEdit
Left = 1
- Top = 382
+ Top = 379
Properties.ReadOnly = True
Properties.ScrollBars = ssBoth
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 16
+ TabOrder = 14
Height = 206
Width = 181
end
@@ -204,31 +196,15 @@ inherited frmMachRollMain: TfrmMachRollMain
Properties.ShowFocusRect = False
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 19
+ TabOrder = 17
Visible = False
Height = 122
Width = 280
end
- object grade: TcxComboBox
- Left = 305
- Top = 209
- AutoSize = False
- Properties.DropDownListStyle = lsEditFixedList
- Properties.Items.Strings = (
- #27491#21697
- #27425#21697)
- Style.HotTrack = False
- Style.TransparentBorder = False
- TabOrder = 10
- Text = #27491#21697
- OnKeyPress = InputLenKeyPress
- Height = 38
- Width = 94
- end
object lblRuleConversion: TcxComboBox
Tag = 2
Left = 140
- Top = 324
+ Top = 321
AutoSize = False
Properties.DropDownListStyle = lsEditFixedList
Properties.Items.Strings = (
@@ -243,7 +219,7 @@ inherited frmMachRollMain: TfrmMachRollMain
StyleDisabled.LookAndFeel.SkinName = 'WXI'
StyleFocused.LookAndFeel.SkinName = 'WXI'
StyleHot.LookAndFeel.SkinName = 'WXI'
- TabOrder = 15
+ TabOrder = 13
Text = #26080#38656#36716#25442
Height = 37
Width = 102
@@ -251,12 +227,12 @@ inherited frmMachRollMain: TfrmMachRollMain
object packnote: TcxMemo
Tag = 999
Left = 191
- Top = 382
+ Top = 379
Properties.ReadOnly = True
Properties.ScrollBars = ssVertical
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 17
+ TabOrder = 15
Height = 206
Width = 199
end
@@ -287,7 +263,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Properties.ReadOnly = True
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 23
+ TabOrder = 21
Visible = False
Width = 124
end
@@ -298,7 +274,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Properties.ReadOnly = True
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 24
+ TabOrder = 22
Text = '100'
Visible = False
OnClick = edtScanEnter
@@ -312,7 +288,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Properties.ReadOnly = True
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 25
+ TabOrder = 23
Visible = False
Width = 168
end
@@ -321,7 +297,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Top = 10000
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 26
+ TabOrder = 24
Visible = False
OnClick = edtScanEnter
Width = 121
@@ -331,7 +307,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Top = 10000
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 27
+ TabOrder = 25
Visible = False
OnClick = edtScanEnter
Width = 121
@@ -341,7 +317,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Top = 10000
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 28
+ TabOrder = 26
Visible = False
OnClick = edtScanEnter
Width = 121
@@ -351,7 +327,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Top = 10000
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 29
+ TabOrder = 27
Visible = False
OnClick = edtScanEnter
Width = 121
@@ -361,7 +337,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Top = 10000
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 30
+ TabOrder = 28
Visible = False
OnClick = edtScanEnter
Width = 121
@@ -371,7 +347,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Top = 10000
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 31
+ TabOrder = 29
Visible = False
OnClick = edtScanEnter
Width = 121
@@ -382,7 +358,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Width = 48
Height = 33
Caption = #30721#21333
- TabOrder = 32
+ TabOrder = 30
Visible = False
OnClick = bt_printmdClick
end
@@ -391,7 +367,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Top = 10000
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 33
+ TabOrder = 31
Visible = False
OnClick = edtScanEnter
Width = 121
@@ -401,7 +377,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Top = 10000
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 34
+ TabOrder = 32
Visible = False
OnClick = edtScanEnter
Width = 121
@@ -411,7 +387,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Top = 10000
Style.HotTrack = False
Style.TransparentBorder = False
- TabOrder = 35
+ TabOrder = 33
Visible = False
OnClick = edtScanEnter
Width = 121
@@ -571,15 +547,6 @@ inherited frmMachRollMain: TfrmMachRollMain
ControlOptions.ShowBorder = False
Index = 1
end
- object dxLayoutItem9: TdxLayoutItem
- Parent = dxLayoutGroup_plan_2
- CaptionOptions.Text = #21305#25968
- Control = Piece
- ControlOptions.OriginalHeight = 33
- ControlOptions.OriginalWidth = 144
- ControlOptions.ShowBorder = False
- Index = 3
- end
object dxLayoutItem10: TdxLayoutItem
Parent = dxLayoutGroup_plan_2
CaptionOptions.Text = #21345#21495
@@ -818,18 +785,6 @@ inherited frmMachRollMain: TfrmMachRollMain
Parent = dxLayoutGroup_do2
Index = 0
end
- object dxLayoutItem_grade: TdxLayoutItem
- Parent = dxLayoutAutoCreatedGroup5
- AlignVert = avClient
- SizeOptions.Width = 134
- AllowRemove = False
- CaptionOptions.Text = '[COLOR=Red][SIZE=12]'#31561#32423'[/COLOR][/SIZE]'
- Control = grade
- ControlOptions.OriginalHeight = 38
- ControlOptions.OriginalWidth = 94
- ControlOptions.ShowBorder = False
- Index = 2
- end
object dxLayoutItem14: TdxLayoutItem
Parent = dxLayoutAutoCreatedGroup4
AlignVert = avClient
@@ -1001,16 +956,8 @@ inherited frmMachRollMain: TfrmMachRollMain
ImageIndex = 21
OnClick = ToolButton3Click
end
- object TprintPack: TToolButton
- Left = 63
- Top = 0
- AutoSize = True
- Caption = #21253#26631#31614
- ImageIndex = 21
- OnClick = TprintPackClick
- end
object Trolldel: TToolButton
- Left = 138
+ Left = 63
Top = 0
AutoSize = True
Caption = #21024#38500
@@ -1018,15 +965,14 @@ inherited frmMachRollMain: TfrmMachRollMain
OnClick = TrolldelClick
end
object ToolButton4: TToolButton
- Left = 201
+ Left = 126
Top = 0
AutoSize = True
Caption = #30133#28857#31649#29702
ImageIndex = 2
- OnClick = ToolButton4Click
end
object ToolButton1: TToolButton
- Left = 288
+ Left = 213
Top = 0
AutoSize = True
Caption = #25171#21367#35774#32622
@@ -1034,7 +980,7 @@ inherited frmMachRollMain: TfrmMachRollMain
OnClick = ToolButton1Click
end
object ToolButton7: TToolButton
- Left = 375
+ Left = 300
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
@@ -1042,15 +988,14 @@ inherited frmMachRollMain: TfrmMachRollMain
OnClick = ToolButton7Click
end
object Tlog: TToolButton
- Left = 462
+ Left = 387
Top = 0
AutoSize = True
Caption = #26085#24535
ImageIndex = 30
- OnClick = TlogClick
end
object ToolButton8: TToolButton
- Left = 525
+ Left = 450
Top = 0
AutoSize = True
Caption = #20851#38381
@@ -1072,7 +1017,6 @@ inherited frmMachRollMain: TfrmMachRollMain
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCustomDrawCell = Tv3CustomDrawCell
- OnFocusedRecordChanged = Tv3FocusedRecordChanged
DataController.DataSource = ds_3
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
@@ -1185,39 +1129,15 @@ inherited frmMachRollMain: TfrmMachRollMain
Options.Editing = False
Width = 54
end
- object Tv3PacketNo: TcxGridDBColumn
- Caption = #21253#21495
- DataBinding.FieldName = 'PacketNo'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 57
- end
- object Tv3BatchNO: TcxGridDBColumn
- Caption = #26412#21378#32568#21495
- DataBinding.FieldName = 'BatchNO'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 89
- end
object tv3CIID: TcxGridDBColumn
Caption = #21367#26465#30721
- DataBinding.FieldName = 'CIID'
+ DataBinding.FieldName = 'BCIOID'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Sorting = False
Width = 112
end
- object Tv3FtyPCId: TcxGridDBColumn
- Caption = #32568#21495
- DataBinding.FieldName = 'FtyPCId'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 77
- end
end
object cxGridLevel2: TcxGridLevel
GridView = Tv3
@@ -1225,8 +1145,8 @@ inherited frmMachRollMain: TfrmMachRollMain
end
end
object cxGroupBox_keys: TcxGroupBox [2]
- Left = 56
- Top = 408
+ Left = 8
+ Top = 390
Caption = #34394#25311#38190#30424
Style.LookAndFeel.NativeStyle = False
StyleDisabled.LookAndFeel.NativeStyle = False
@@ -1253,80 +1173,35 @@ inherited frmMachRollMain: TfrmMachRollMain
ExplicitTop = 7
ExplicitWidth = 311
ExplicitHeight = 206
- inherited SpeedButton1: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton4: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton7: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton2: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton5: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton8: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton3: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton6: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton9: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton_back: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton_backClick
- end
- inherited SpeedButton0: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton_dot: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
inherited SpeedButton_yc: TSpeedButton
OnClick = FrameKeyBoard1SpeedButton_ycClick
end
- inherited SpeedButton_zdykey2: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton_zdykey1: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
- inherited SpeedButton10: TSpeedButton
- OnClick = FrameKeyBoard1SpeedButton1Click
- end
end
end
object MovePanel1: TMovePanel
- Left = 89
- Top = -23
+ Left = 85
+ Top = -29
Width = 237
- Height = 42
+ Height = 45
BevelOuter = bvNone
DockSite = True
- ParentColor = True
+ ParentBackground = False
TabOrder = 1
end
end
inherited loadProcess: TPanel
- Left = 483
- Top = 157
+ Left = 531
+ Top = 173
Width = 177
- ExplicitLeft = 483
- ExplicitTop = 157
+ ExplicitLeft = 531
+ ExplicitTop = 173
ExplicitWidth = 177
end
inherited cxProgressBar2: TcxProgressBar
- Left = 483
- Top = 121
- ExplicitLeft = 483
- ExplicitTop = 121
+ Left = 531
+ Top = 125
+ ExplicitLeft = 531
+ ExplicitTop = 125
ExplicitHeight = 29
end
inherited ADOQueryBaseCmd: TADOQuery
diff --git a/T03贸易布匹检验/U_MachRollMain.pas b/T03贸易布匹检验/U_MachRollMain.pas
index 19a8c9e..406f6d9 100644
--- a/T03贸易布匹检验/U_MachRollMain.pas
+++ b/T03贸易布匹检验/U_MachRollMain.pas
@@ -22,7 +22,6 @@ type
TfrmMachRollMain = class(TfrmBaseList)
dxLayoutControl_packGroup_Root: TdxLayoutGroup;
dxLayoutControl_pack: TdxLayoutControl;
- Piece: TcxTextEdit;
Qty: TcxTextEdit;
FtyPCId: TcxTextEdit;
Color: TcxTextEdit;
@@ -42,7 +41,6 @@ type
dxLayoutGroup_plan_2: TdxLayoutGroup;
dxLayoutItem7: TdxLayoutItem;
dxLayoutItem8: TdxLayoutItem;
- dxLayoutItem9: TdxLayoutItem;
dxLayoutItem10: TdxLayoutItem;
dxLayoutEmptySpaceItem1: TdxLayoutEmptySpaceItem;
InputLen: TcxTextEdit;
@@ -106,8 +104,6 @@ type
cds_paramsoutPage: TStringField;
ADOQueryPrint: TADOQuery;
RM1: TRMGridReport;
- grade: TcxComboBox;
- dxLayoutItem_grade: TdxLayoutItem;
cds_paramsEndPieceNo: TIntegerField;
cds_paramsBeginPieceNo: TIntegerField;
cds_paramsFixedLength: TIntegerField;
@@ -121,7 +117,6 @@ type
dxLayoutItem_packnote: TdxLayoutItem;
packnote: TcxMemo;
RMDB_1: TRMDBDataSet;
- TprintPack: TToolButton;
Tlog: TToolButton;
cxGroupBox_keys: TcxGroupBox;
FrameKeyBoard1: TFrameKeyBoard;
@@ -171,52 +166,34 @@ type
v3NetWeight: TcxGridDBColumn;
v3GrossWeight: TcxGridDBColumn;
Tv3Grade: TcxGridDBColumn;
- Tv3PacketNo: TcxGridDBColumn;
- Tv3BatchNO: TcxGridDBColumn;
tv3CIID: TcxGridDBColumn;
- Tv3FtyPCId: TcxGridDBColumn;
cxGridLevel2: TcxGridLevel;
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
- procedure frameBads1cxButton3Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormDestroy(Sender: TObject);
procedure edtScanDblClick(Sender: TObject);
procedure edtScanKeyPress(Sender: TObject; var Key: Char);
- procedure frameBads1cxCheckBox_readLenPropertiesChange(Sender: TObject);
procedure ToolButton8Click(Sender: TObject);
- procedure SpeedButton1Click(Sender: TObject);
- procedure SpeedButton_backClick(Sender: TObject);
procedure edtScanEnter(Sender: TObject);
- procedure Edit_fixLenClick(Sender: TObject);
procedure BTPrintClick(Sender: TObject);
procedure ToolButton7Click(Sender: TObject);
- procedure ToolButton4Click(Sender: TObject);
procedure TrolldelClick(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure Tv3CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
- procedure Tv3FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
procedure InputLenKeyPress(Sender: TObject; var Key: Char);
procedure InputLenPropertiesChange(Sender: TObject);
- procedure Edit_pieceOrderClick(Sender: TObject);
- procedure TprintPackClick(Sender: TObject);
- procedure TlogClick(Sender: TObject);
- procedure FrameKeyBoard1SpeedButton_backClick(Sender: TObject);
- procedure FrameKeyBoard1SpeedButton1Click(Sender: TObject);
procedure FrameKeyBoard1SpeedButton_ycClick(Sender: TObject);
procedure dxLayoutItem1CaptionClick(Sender: TObject);
procedure Tv2DblClick(Sender: TObject);
procedure lblRuleConversionPropertiesChange(Sender: TObject);
- procedure frameBads1CIFBegDblClick(Sender: TObject);
- procedure frameBads1cxCheck_lenPropertiesChange(Sender: TObject);
procedure bt_printmdClick(Sender: TObject);
procedure dxLayoutControl_packDblClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
private
- FCIID, FOperationStatus, FCIFName, FWorkshop: string;
- FBCIOID, FOrderNo, FMainId, FSubId, FPCId, FConNo, FConMId, fBuyConNo, FConSId, FQtyUnit: string;
- FBatchNO, FLenUnit, FC_Code, FC_Name, FC_EName, FC_Spec, FC_Width, FC_GramWeight: string;
- FC_Color, FC_EColor, FC_ColorNo, FC_StyleNo, FC_Composition, FC_Pattern, FC_CustPattern, FC_ColorDepth: string;
+ FCIID, FCIFName, FWorkshop: string;
+ FBCIOID, FQtyUnit, FLenUnit: string;
+
Faddwet, faddlen: double;
FFtyPCId, FGangNo, FRulePieceNo, FCDUnit: string;
FPieceNo: Integer;
@@ -230,8 +207,7 @@ type
fTareType: string;
funitPiecesStr: string; //ƴƥ
procedure setFocusCtrol(controlName: string);
- procedure CIFEndChange(Sender: TObject);
- function CheckData(CKType: string): Boolean;
+
procedure QuantityConversion();
procedure ClearGlobal();
procedure InitPlan(MSubID: string);
@@ -239,26 +215,20 @@ type
procedure SetDdetails();
procedure SetINIFile();
procedure GetINIFile();
- procedure InitCDGrid(MCIID: string);
- procedure InitCDGridCX(MCIID: string);
procedure InitJYGrid();
procedure OpenCom(DllName: string);
procedure CloseCom(DllName: string);
function SaveData(): Boolean;
procedure PrtData(MCIID: string; againPring: Boolean = false);
- procedure PrintBao(PPacketId: string; againPring: Boolean = false);
- procedure InitJTM(MCIID: string);
+
procedure BadSpeedButtonClick(Sender: TObject);
procedure setFormCtrol();
procedure PrtMD(MInNo: string);
procedure On1201(var Message: Tmessage); message 1201; // ӳ
procedure On1301(var Message: Tmessage); message 1301; //
- procedure initEditPiece();
- procedure GetPacketNo();
- procedure getPlanImage(MSubID: string);
+ function CheckData(CKType: string): Boolean;
+
function deletePack(packId: string): boolean;
- function checkPicecNo(): boolean;
- function getCurPieceNO(mCcid: string): string;
type
@@ -279,6 +249,61 @@ uses
U_LabelPrint, U_TradeClothTotalOutSel;
{$R *.dfm}
+function TfrmMachRollMain.CheckData(CKType: string): Boolean;
+var
+ mvalue: double;
+ mCurPieceNo: Integer;
+begin
+ Result := false;
+
+ try
+ if trim(FBCIOID) = '' then
+ raise Exception.create('ɨ̿');
+
+ if trim(CKType) = 'ύ' then
+ begin
+
+ if trim(lblLenUnit.CaptionOptions.Hint) = '' then
+ raise Exception.create('ȵλΪ!');
+
+ if trim(InputWeight.Text) <> '' then
+ begin
+ if TryStrToFloat(InputWeight.Text, mvalue) = false then
+ raise Exception.create('¼!');
+ if strtofloatdef(trim(InputWeight.Text), 0) < cds_params.fieldbyName('minWeight').AsInteger then
+ raise Exception.create('С' + cds_params.fieldbyName('minWeight').AsString + '!');
+ if strtofloatdef(trim(InputWeight.Text), 0) > cds_params.fieldbyName('maxWeight').AsInteger then
+ raise Exception.create('ܴ' + cds_params.fieldbyName('maxWeight').AsString + '!');
+ end;
+
+ if trim(InputLen.Text) <> '' then
+ begin
+ if TryStrToFloat(InputLen.Text, mvalue) = false then
+ raise Exception.create('¼!');
+ if strtofloatdef(trim(InputLen.Text), 0) < cds_params.fieldbyName('minLen').AsInteger then
+ raise Exception.create('ȲС' + cds_params.fieldbyName('minLen').AsString + '!');
+ if strtofloatdef(trim(InputLen.Text), 0) > cds_params.fieldbyName('maxLen').AsInteger then
+ raise Exception.create('Ȳܴ' + cds_params.fieldbyName('maxLen').AsString + '!');
+ end;
+
+ if FQtyUnit = 'Kg' then
+ begin
+ if (strtofloatdef(trim(InputWeight.Text), 0) = 0) then
+ raise Exception.create('Ϊ0!!');
+ end
+ else
+ begin
+ if (strtofloatdef(trim(InputLen.Text), 0) = 0) then
+ raise Exception.create('ȲΪ0!!');
+ end;
+
+ end;
+ Result := true;
+ except
+ Application.MessageBox(pchar(Exception(ExceptObject).Message), 'ʾϢ', 0);
+ end;
+end;
+
procedure TfrmMachRollMain.BTPrintClick(Sender: TObject);
var
fPrintFile, MPacketId: string;
@@ -291,11 +316,7 @@ begin
edtScan.SetFocus;
if trim(OrderNo.Text) = '' then
exit;
- if trim(grade.Text) = '' then
- begin
- Application.MessageBox('ȼΪ!', 'ʾ', 0);
- exit;
- end;
+
if CheckData('ύ') = false then
exit;
@@ -311,22 +332,9 @@ begin
presentLen.Text := '';
funitPiecesStr := '';
presentWeight.Text := '';
- if BTPrint.Caption = 'ύ' then
- begin
- BTPrint.Caption := ' ';
- cds_params.edit;
- cds_params.fieldbyName('chen').value := '1';
- cds_params.fieldbyName('mabiao').value := '1';
- cds_params.Post;
- if fileexists(ExtractFilePath(Application.ExeName) + 'ijɹ.wav') then
- playSound(pwidechar('ijɹ.wav'), 0, SND_FILENAME or SND_ASYNC);
- end
- else
- begin
- if fileexists(ExtractFilePath(Application.ExeName) + 'ȷ.wav') then
- playSound(pwidechar('ȷ.wav'), 0, SND_FILENAME or SND_ASYNC);
- end;
+ if fileexists(ExtractFilePath(Application.ExeName) + 'ȷ.wav') then
+ playSound(pwidechar('ȷ.wav'), 0, SND_FILENAME or SND_ASYNC);
InputWeight.Text := '';
@@ -338,9 +346,8 @@ begin
end;
InputLen.SetFocus;
setFocusCtrol(InputLen.Name);
- FOperationStatus := '';
InitJYGrid();
- InitCDGrid('');
+
FCIID := '';
finally
BTPrint.Enabled := true;
@@ -425,12 +432,6 @@ begin
cds_params.Close;
cds_params.CreateDataSet;
Panel_right.Align := alClient;
- frameBads1.CIFBeg.OnEnter := edtScanEnter;
- frameBads1.CIFEnd.OnEnter := edtScanEnter;
- frameBads1.CIFNumber.OnEnter := edtScanEnter;
- frameBads1.SubtractQty.OnEnter := edtScanEnter;
- frameBads1.CIFQty.OnEnter := edtScanEnter;
-
end;
procedure TfrmMachRollMain.FormDestroy(Sender: TObject);
@@ -444,32 +445,11 @@ var
i: Integer;
begin
inherited;
- gIsCanDesign := gIsCanDesign; //IsHasDesignRight(ADOQueryBaseTemp, PWideChar(dCode));
+ gIsCanDesign := gIsCanDesign;
gGridNativeSet := true;
- if gIsCanDesign then
- begin
- cxGridPopupMenu1.Grid := cxGrid3;
- end;
- TgridLiSet.Visible := gIsCanDesign;
- InitDevCombobox(ADOQueryBaseTemp, grade, 'CPGRADE');
- ReadCxGrid(trim(Self.Caption) + 'Tv1', TV1, gDllFileCaption);
- ReadCxGrid(trim(Self.Caption) + 'Tv2', Tv2, gDllFileCaption);
+
+// InitDevCombobox(ADOQueryBaseTemp, grade, 'CPGRADE');
ReadCxGrid(trim(Self.Caption) + 'Tv3', Tv3, gDllFileCaption);
- // fDllFileName + '|' + Self.Name + '|' + dxLayoutControl_pack.Name+ '.ini'
- readLayOut(dxLayoutControl_pack, ADOQueryBaseTemp, PWideChar(fDllFileName + '|' + self.name + '|' + dxLayoutControl_pack.Name + '.ini'));
- frameBads1.fBadBtnSize := gBcSpeedSize;
- frameBads1.InitBadPanel;
- with frameBads1.cxScrollBox1 do
- begin
- for i := 0 to ControlCount - 1 do
- begin
- if Controls[i] is TSpeedButton then
- begin
- TSpeedButton(Controls[i]).OnClick := BadSpeedButtonClick;
- end;
- end;
- end;
- InitCDGrid(FCIID);
if IsINIFile() then
ReadINIFile()
@@ -498,209 +478,18 @@ begin
end;
end;
-procedure TfrmMachRollMain.frameBads1CIFBegDblClick(Sender: TObject);
-begin
- inherited;
- if strTofloatDef(trim(frameBads1.CIFBeg.text), 0) = 0 then
- frameBads1.CIFBeg.text := inputLen.Text;
-end;
-
-procedure TfrmMachRollMain.frameBads1cxButton3Click(Sender: TObject);
-begin
- inherited;
- frameBads1.Visible := false;
-
-end;
-
-procedure TfrmMachRollMain.frameBads1cxCheckBox_readLenPropertiesChange(Sender: TObject);
-begin
- inherited;
- frameBads1.CIFBeg.Text := '';
-// if trim(TcxTextEdit(Sender).Text) = '' then
-// begin
-// frameBads1.CIFBeg.Text := '';
-// end
-// else
-// begin
-// frameBads1.CIFBeg.Text := '';
-// end;
-end;
-
-procedure TfrmMachRollMain.frameBads1cxCheck_lenPropertiesChange(Sender: TObject);
-begin
- inherited;
- if frameBads1.cxCheck_len.Checked and (trim(InputLen.Text) <> '') then
- begin
- frameBads1.CIFBeg.Text := trim(InputLen.Text);
- frameBads1.CIFEnd.SetFocus;
- end
- else
- begin
- frameBads1.CIFBeg.Text := ''
- end;
-end;
-
-procedure TfrmMachRollMain.FrameKeyBoard1SpeedButton1Click(Sender: TObject);
-var
- fsj: string;
- mComponent: TComponent;
- mkey: Char;
-begin
- fsj := trim(TSpeedButton(Sender).Hint);
- if trim(fsj) = '' then
- exit;
- mComponent := FindComponent(trim(TSpeedButton(Sender).Hint));
- if mComponent = nil then
- mComponent := frameBads1.FindComponent(trim(TSpeedButton(Sender).Hint));
- if mComponent = nil then
- exit;
- if TcxTextEdit(mComponent).Name = 'KuangHao' then
- exit;
- if (TcxTextEdit(mComponent).Name = 'edtScan') and (trim(TSpeedButton(Sender).Caption) = 'س') then
- begin
- mkey := #13;
- edtScanKeyPress(edtScan, mkey);
- exit;
- end;
- fsj := trim(TcxTextEdit(mComponent).Text);
- if mComponent is TcxCurrencyEdit then
- begin
- TcxCurrencyEdit(mComponent).text := fsj + trim(TSpeedButton(Sender).Caption);
- TcxCurrencyEdit(mComponent).SelectAll;
- end
- else
- begin
- TcxTextEdit(mComponent).Text := fsj + trim(TSpeedButton(Sender).Caption);
- TcxTextEdit(mComponent).SelectAll;
- end;
-
-end;
-
-procedure TfrmMachRollMain.FrameKeyBoard1SpeedButton_backClick(Sender: TObject);
-var
- fsj: string;
- mComponent: TComponent;
-begin
- mComponent := FindComponent(trim(TSpeedButton(Sender).Hint));
- if mComponent = nil then
- mComponent := frameBads1.FindComponent(trim(TSpeedButton(Sender).Hint));
- if mComponent = nil then
- exit;
- fsj := trim(TcxTextEdit(mComponent).Text);
- if trim(fsj) = '' then
- exit;
- TcxTextEdit(mComponent).Text := copy(fsj, 1, Length(fsj) - 1);
- TcxTextEdit(mComponent).SelectAll;
-
-end;
-
procedure TfrmMachRollMain.FrameKeyBoard1SpeedButton_ycClick(Sender: TObject);
begin
inherited;
cxGroupBox_keys.Visible := false;
end;
-function TfrmMachRollMain.CheckData(CKType: string): Boolean;
-var
- mvalue: double;
- mCurPieceNo: Integer;
-begin
- Result := false;
- mCurPieceNo := strtointdef(trim(Pieceno.Text), 0);
- try
- if trim(FBCIOID) = '' then
- raise Exception.create('ɨ̿');
-
- if trim(CKType) = 'ύ' then
- begin
- if (cds_params.fieldbyName('BeginPieceNo').AsInteger > cds_params.fieldbyName('endPieceNo').AsInteger) then
- begin
- if (mCurPieceNo > 0) and not ((mCurPieceNo <= cds_params.fieldbyName('BeginPieceNo').AsInteger) and (mCurPieceNo >= cds_params.fieldbyName('endPieceNo').AsInteger)) then
- begin
- Application.MessageBox('ֶŲõķΧ!', 'ʾϢ', 0);
- Exit;
- end;
- end;
- if (cds_params.fieldbyName('BeginPieceNo').AsInteger < cds_params.fieldbyName('endPieceNo').AsInteger) then
- begin
- if (mCurPieceNo > 0) and not ((mCurPieceNo >= cds_params.fieldbyName('BeginPieceNo').AsInteger) and (mCurPieceNo <= cds_params.fieldbyName('endPieceNo').AsInteger)) then
- begin
- Application.MessageBox('ֶŲõķΧ!', 'ʾϢ', 0);
- Exit;
- end;
- end;
-
- if trim(cds_params.fieldbyName('dabao').AsString) = '' then
- begin
- if strtointdef(edtPacketNo.Text, 0) = 0 then
- raise Exception.create('ŲΪ!');
- if cds_params.fieldbyName('packRolls').AsInteger = 0 then
- raise Exception.create('ÿδ!');
-
- end;
-
- if (strtointdef(PieceNo.Text, 0) = 0) and (trim(cds_params.fieldbyName('rollNoMake').AsString) = 'ֶ') then
- raise Exception.create('ŲΪ!');
-
- if trim(lblLenUnit.CaptionOptions.Hint) = '' then
- raise Exception.create('ȵλΪ!');
-
- if trim(InputWeight.Text) <> '' then
- begin
- if TryStrToFloat(InputWeight.Text, mvalue) = false then
- raise Exception.create('¼!');
- if strtofloatdef(trim(InputWeight.Text), 0) < cds_params.fieldbyName('minWeight').AsInteger then
- raise Exception.create('С' + cds_params.fieldbyName('minWeight').AsString + '!');
- if strtofloatdef(trim(InputWeight.Text), 0) > cds_params.fieldbyName('maxWeight').AsInteger then
- raise Exception.create('ܴ' + cds_params.fieldbyName('maxWeight').AsString + '!');
- end;
-
- if trim(InputLen.Text) <> '' then
- begin
- if TryStrToFloat(InputLen.Text, mvalue) = false then
- raise Exception.create('¼!');
- if strtofloatdef(trim(InputLen.Text), 0) < cds_params.fieldbyName('minLen').AsInteger then
- raise Exception.create('ȲС' + cds_params.fieldbyName('minLen').AsString + '!');
- if strtofloatdef(trim(InputLen.Text), 0) > cds_params.fieldbyName('maxLen').AsInteger then
- raise Exception.create('Ȳܴ' + cds_params.fieldbyName('maxLen').AsString + '!');
- end;
-
- if (strtofloatdef(trim(InputLen.Text), 0) = 0) and (strtofloatdef(trim(InputWeight.Text), 0) = 0) and (strtofloatdef(trim(Edit_fixLen.Text), 0) = 0) then
- raise Exception.create('ȺܶΪ0!!');
- end;
- Result := true;
- except
- Application.MessageBox(pchar(Exception(ExceptObject).Message), 'ʾϢ', 0);
- end;
-end;
-
procedure TfrmMachRollMain.ClearGlobal();
begin
FBCIOID := '';
- FOrderNo := '';
- FConNo := '';
- FConMId := '';
- FConSId := '';
+
FQtyUnit := '';
- FMainId := '';
- FSubId := '';
- FPCId := '';
- FC_CustPattern := '';
- FC_ColorDepth := '';
- FFtyPCId := '';
- FGangNo := '';
- FC_Code := '';
- FC_Name := '';
- FBatchNO := '';
- FC_Spec := '';
- FC_Color := '';
- FC_ColorNo := '';
- FC_EColor := '';
- FC_StyleNo := '';
- FC_Composition := '';
- FC_Width := '';
- FC_GramWeight := '';
- FC_Pattern := '';
+
FCIID := '';
FWorkshop := '';
InputLen.Text := '';
@@ -709,7 +498,6 @@ begin
Tare.Text := '';
InputWeight.Text := '';
FLenUnit := '';
- BatchNO.Text := '';
Faddwet := 0;
faddlen := 0;
FPacketCIID := '';
@@ -782,124 +570,48 @@ begin
if not IsEmpty then
begin
- getPlanImage(trim(MSubID));
- FLenUnit := trim(ADOQueryBaseTemp.fieldbyName('ruleLenUnit').AsString);
+ FLenUnit := trim(ADOQueryBaseTemp.fieldbyName('LenUnit').AsString);
if FLenUnit = '' then
begin
FLenUnit := 'M';
end;
- fLabPackage := trim(ADOQueryBaseTemp.fieldbyName('LabPackage').AsString);
- fLabVolume := trim(ADOQueryBaseTemp.fieldbyName('LabVolume').AsString);
- if (FLenUnit = '') then
- begin
- ShowMessage('ƻװδóȵλ!');
- end;
+
+ fLabPackage := 'Ĭϰǩ';
+ fLabVolume := 'Ĭϱǩ';
+
+
+// fLabPackage := trim(ADOQueryBaseTemp.fieldbyName('LabPackage').AsString);
+// fLabVolume := trim(ADOQueryBaseTemp.fieldbyName('LabVolume').AsString);
SetUnit(FLenUnit);
FCDUnit := lblLenUnit.CaptionOptions.Hint;
FBCIOID := trim(fieldbyName('BCIOID').AsString);
- FConMId := trim(fieldbyName('ConMId').AsString);
- FConSId := trim(fieldbyName('ConSId').AsString);
- FQtyUnit := trim(fieldbyName('OrdUnit').AsString);
- FConNo := trim(fieldbyName('ConNo').AsString);
- FOrderNo := trim(fieldbyName('OrderNo').AsString);
- fBuyConNo := trim(fieldbyName('BuyConNo').AsString);
- FMainId := trim(fieldbyName('MainId').AsString);
- FSubId := trim(fieldbyName('SubId').AsString);
- // FPCId := Trim(ADOTmp.fieldbyname('ToPCId').AsString);
- // FC_CustPattern := Trim(ADOTmp.fieldbyname('C_CustPattern').AsString);
- // FC_ColorDepth := Trim(ADOTmp.fieldbyname('C_ColorDepth').AsString);
- // FWorkshop := Trim(ADOTmp.fieldbyname('Workshop').AsString);
- FC_StyleNo := trim(fieldbyName('C_StyleNo').AsString);
- FC_Composition := trim(fieldbyName('C_Composition').AsString);
- FC_Code := trim(fieldbyName('C_Code').AsString);
- FC_Name := trim(fieldbyName('C_Name').AsString);
- FC_EName := trim(fieldbyName('C_EName').AsString);
- FBatchNO := Trim(fieldbyname('BatchNO').AsString);
- FC_Spec := trim(fieldbyName('C_Spec').AsString);
- FC_Color := trim(fieldbyName('C_Color').AsString);
- FC_ColorNo := trim(fieldbyName('C_ColorNo').AsString);
- FC_EColor := trim(fieldbyName('C_EColor').AsString);
- FC_Width := trim(fieldbyName('C_Width').AsString);
- FC_GramWeight := trim(fieldbyName('C_GramWeight').AsString);
- C_width.Text := FC_Width;
- C_GramWeight.Text := FC_GramWeight;
- FC_Pattern := trim(fieldbyName('C_Pattern').AsString);
+
+ FQtyUnit := trim(fieldbyName('QtyUnit').AsString);
+
+ C_width.Text := trim(fieldbyName('C_width').AsString);
+ C_GramWeight.Text := trim(fieldbyName('C_GramWeight').AsString);
+
C_Pattern.Text := trim(fieldbyName('C_Pattern').AsString);
FFtyPCId := trim(fieldbyName('FtyPCId').AsString);
- FRulePieceNo := trim(fieldbyName('RulePieceNo').AsString);
- //
- Faddwet := fieldbyName('RuleAddwet').AsFloat;
- //ӳ
- faddlen := fieldbyName('RuleAddLen').AsFloat;
- addwet.text := floatTostr(Faddwet);
- addLen.text := floatTostr(fAddLen);
-
- fAddwetVirtual := fieldbyName('RuleAddwetVirtual').AsFloat;
- fAddLenVirtual := fieldbyName('RuleAddLenVirtual').AsFloat;
- // ɹ
- if (FRulePieceNo = 'ֶ') or (FRulePieceNo = 'ֶ') then
- begin
- cds_params.edit;
- cds_params.fieldbyName('rollNoMake').value := 'ֶ';
- cds_params.Post;
- dxLayoutItem_roll.Visible := true;
- PieceNo.Text := '';
- end;
- // ɹ
- if (trim(fieldbyName('RulePackNo').AsString) = 'ֶ') or (trim(fieldbyName('RulePackNo').AsString) = 'ֶ') then
- begin
- cds_params.edit;
- cds_params.fieldbyName('packNoMake').value := 'ֶ';
- cds_params.Post;
- dxLayoutItem_packno.Visible := true;
- edtPacketNo.Text := '';
- end;
- // ÿ
- cds_params.edit;
- cds_params.fieldbyName('packRolls').value := fieldbyName('packRolls').AsInteger;
- cds_params.fieldbyName('packlabnumber').value := fieldbyName('packlabnumber').AsInteger;
- cds_params.fieldbyName('packPostAction').value := trim(fieldbyName('packPostAction').AsString);
- if (fieldbyName('packRolls').AsInteger > 0) and (trim(fieldbyName('RulePackNo').AsString) <> '') then
- begin
- cds_params.fieldbyName('dabao').value := '';
- end
- else
- begin
- cds_params.fieldbyName('dabao').value := '';
- end;
- if fieldbyName('DecimalY').AsInteger > 0 then
- cds_params.fieldbyName('Yplace').value := fieldbyName('DecimalY').AsInteger;
- if fieldbyName('DecimalM').AsInteger > 0 then
- cds_params.fieldbyName('MPlace').value := fieldbyName('DecimalM').AsInteger;
- if fieldbyName('DecimalKg').AsInteger > 0 then
- cds_params.fieldbyName('kgPlace').value := fieldbyName('DecimalKg').AsInteger;
-
- //
cds_params.fieldbyName('outPage').value := '';
cds_params.Post;
- //
-// BatchNO.Text := trim(fieldbyName('batchNo').AsString);
Coefficient.Text := trim(fieldbyName('Coefficient').AsString);
// תϵ
lblRuleConversion.ItemIndex := lblRuleConversion.Properties.Items.IndexOf(fieldbyName('RuleConversion').AsString);
- OrderNo.Text := FOrderNo;
- CodeName.Text := FC_Name;
- ColorNo.Text := FC_ColorNo;
- Color.Text := FC_Color;
FtyPCId.Text := FFtyPCId;
BCIOID.Text := FBCIOID;
- Piece.Text := trim(fieldbyName('ordPiece').AsString);
- Qty.Text := trim(fieldbyName('ordQty').AsString) + trim(fieldbyName('ordUnit').AsString);
- //
+
+ Qty.Text := trim(fieldbyName('Qty').AsString) + trim(fieldbyName('QtyUnit').AsString);
+
Tare.Text := trim(fieldbyName('RuleLaterTare').AsString);
fTareType := '';
@@ -908,23 +620,8 @@ begin
RuleYardstick.Text := trim(fieldbyName('RuleYardstick').AsString)
else
RuleYardstick.Text := '100';
+
packnote.Lines.Clear;
-// packnote.Lines.Add('װҪ');
-// packnote.Lines.Add(trim(fieldbyName('packnote').AsString));
-// packnote.Lines.Add('ע');
-// packnote.Lines.Add(trim(fieldbyName('ordnote').AsString));
- // dxLayoutItem_pieceorder
- if StrToFloatDef(fieldbyName('FixedLength').AsString, 0) > 0 then
- begin
- dxLayoutItem_fixlen.Visible := true;
- // Edit_fixLen.Text := '';
- Edit_fixLen.Text := trim(fieldbyName('FixedLength').AsString);
- end
- else
- begin
- dxLayoutItem_fixlen.Visible := false;
- Edit_fixLen.Text := '';
- end;
InputLen.SetFocus;
setFocusCtrol(InputLen.Name);
@@ -937,7 +634,7 @@ begin
end;
end;
InitJYGrid();
- InitCDGrid(FCIID);
+
edtScan.Text := '';
// ʾ
@@ -979,49 +676,9 @@ end;
procedure TfrmMachRollMain.SetUnit(MUnit: string);
begin
- // lblLenUnit.Caption := MUnit;
+
lblLenUnit.CaptionOptions.Hint := MUnit;
lblLenUnit.CaptionOptions.Text := '[B][SIZE=16]' + MUnit + '[/SIZE][/B]';
- // lblLenUnit1.Caption := MUnit;
- frameBads1.lblLenUnit1.Caption := MUnit;
-end;
-
-procedure TfrmMachRollMain.SpeedButton1Click(Sender: TObject);
-var
- fsj: string;
- mComponent: TComponent;
-begin
- fsj := trim(TSpeedButton(Sender).Hint);
- if trim(fsj) = '' then
- exit;
- mComponent := FindComponent(trim(TSpeedButton(Sender).Hint));
- if mComponent = nil then
- mComponent := frameBads1.FindComponent(trim(TSpeedButton(Sender).Hint));
- if mComponent = nil then
- exit;
- if TcxTextEdit(mComponent).Name = 'KuangHao' then
- exit;
- fsj := trim(TcxTextEdit(mComponent).Text);
- TcxTextEdit(mComponent).Text := fsj + trim(TSpeedButton(Sender).Caption);
- TcxTextEdit(mComponent).SelectAll;
-
-end;
-
-procedure TfrmMachRollMain.SpeedButton_backClick(Sender: TObject);
-var
- fsj: string;
- mComponent: TComponent;
-begin
- mComponent := FindComponent(trim(TSpeedButton(Sender).Hint));
- if mComponent = nil then
- mComponent := frameBads1.FindComponent(trim(TSpeedButton(Sender).Hint));
- if mComponent = nil then
- exit;
- fsj := trim(TcxTextEdit(mComponent).Text);
- if trim(fsj) = '' then
- exit;
- TcxTextEdit(mComponent).Text := copy(fsj, 1, Length(fsj) - 1);
- TcxTextEdit(mComponent).SelectAll;
end;
@@ -1045,8 +702,6 @@ begin
if (trim(MBDYDllName) <> '') and not fIsCommopen then
OpenCom(MBDYDllName);
- // edtScan.SetFocus;
-
end;
end;
@@ -1054,30 +709,7 @@ procedure TfrmMachRollMain.ToolButton3Click(Sender: TObject);
begin
if cds_3.IsEmpty then
exit;
- PrtData(cds_3.fieldbyName('CIID').AsString);
-
-end;
-
-procedure TfrmMachRollMain.ToolButton4Click(Sender: TObject);
-begin
- try
- frmZDYHelp := TfrmZDYHelp.create(Application);
- with frmZDYHelp do
- begin
- ToolButton1.Visible := false;
- DConString := Self.ADOQueryBaseCmd.Connection.ConnectionString;
- flag := 'WFBCD';
- flagname := 'õ';
- fnote := true;
- V1Note.Caption := 'Ӣ';
- if ShowModal = 1 then
- begin
- Self.frameBads1.InitBadPanel();
- end;
- end;
- finally
- frmZDYHelp.free;
- end;
+ PrtData(cds_3.fieldbyName('BCIOID').AsString);
end;
@@ -1169,30 +801,9 @@ begin
ACanvas.Brush.Color := clRed;
end;
-procedure TfrmMachRollMain.Tv3FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
-begin
- inherited;
-
- InitCDGridCX(cds_3.fieldbyName('CIID').AsString);
-end;
-
-procedure TfrmMachRollMain.TlogClick(Sender: TObject);
-begin
- frmSysLogList := TfrmSysLogList.create(Self);
- with frmSysLogList do
- begin
- fModel := Self.Caption;
- FMainId := trim(Self.FMainId);
- ShowModal;
- free;
- end;
-
-end;
-
procedure TfrmMachRollMain.ToolButton7Click(Sender: TObject);
begin
- WriteCxGrid(trim(Self.Caption) + 'Tv1', TV1, gDllFileCaption);
- WriteCxGrid(trim(Self.Caption) + 'Tv2', Tv2, gDllFileCaption);
+
WriteCxGrid(trim(Self.Caption) + 'Tv3', Tv3, gDllFileCaption);
if gIsCanDesign then
begin
@@ -1206,13 +817,6 @@ begin
Close;
end;
-procedure TfrmMachRollMain.TprintPackClick(Sender: TObject);
-begin
- if cds_3.IsEmpty or (trim(cds_3.fieldbyName('PacketId').AsString) = '') then
- exit;
- PrintBao(trim(cds_3.fieldbyName('PacketId').AsString));
-end;
-
procedure TfrmMachRollMain.setFocusCtrol(controlName: string);
var
i: Integer;
@@ -1239,66 +843,11 @@ begin
cxGroupBox_keys.Visible := true;
end;
-procedure TfrmMachRollMain.CIFEndChange(Sender: TObject);
-var
- mvalue: double;
-begin
- if trim(frameBads1.CIFBeg.Text) <> '' then
- begin
- if TryStrToFloat(frameBads1.CIFBeg.Text, mvalue) = false then
- begin
- Application.MessageBox('Ƿ!', 'ʾ', 0);
- exit;
- end;
- end
- else
- begin
- exit;
- end;
- if trim(frameBads1.CIFEnd.Text) <> '' then
- begin
- if TryStrToFloat(frameBads1.CIFEnd.Text, mvalue) = false then
- begin
- Application.MessageBox('Ƿ!', 'ʾ', 0);
- exit;
- end;
- end
- else
- begin
- exit;
- end;
- frameBads1.CIFQty.Text := floattostr(StrToFloat(frameBads1.CIFEnd.Text) - StrToFloat(frameBads1.CIFBeg.Text));
-end;
-
procedure TfrmMachRollMain.SetDdetails();
begin
AOrdDefNote1.Text := '';
- if fBuyConNo <> '' then
- AOrdDefNote1.Text := AOrdDefNote1.Text + 'ͻ:' + fBuyConNo + #13;
+
AOrdDefNote1.Text := AOrdDefNote1.Text + ':' + FBCIOID + #13;
- if FC_EName <> '' then
- AOrdDefNote1.Text := AOrdDefNote1.Text + 'Ʒ:' + FC_Name + '(' + FC_EName + ')' + #13
- else
- AOrdDefNote1.Text := AOrdDefNote1.Text + 'Ʒ:' + FC_Name + #13;
- AOrdDefNote1.Text := AOrdDefNote1.Text + 'ŷ:' + FC_Width + ' :' + FC_GramWeight + #13;
- // AOrdDefNote1.Text := AOrdDefNote1.Text + ':' + FC_GramWeight + #13;
- // AOrdDefNote1.Text := AOrdDefNote1.Text + 'ɫ:' + FC_Color + ' ɫ:' + FC_ColorNo + #13;
- // AOrdDefNote1.Text := AOrdDefNote1.Text + 'ɫ:' + FC_ColorNo + #13;
- if FC_StyleNo <> '' then
- AOrdDefNote1.Text := AOrdDefNote1.Text + ':' + FC_StyleNo + #13;
- if abs(Faddwet) > 0 then
- begin
- AOrdDefNote1.Text := AOrdDefNote1.Text + ':' + FC_Pattern + ' :' + floattostr(Faddwet) + #13;
- end
- else if abs(faddlen) > 0 then
- begin
- AOrdDefNote1.Text := AOrdDefNote1.Text + ':' + FC_Pattern + ' ӳ:' + floattostr(faddlen) + #13;
- end
- else
- begin
- if FC_Pattern <> '' then
- AOrdDefNote1.Text := AOrdDefNote1.Text + ':' + FC_Pattern + #13;
- end;
if FRulePieceNo <> '' then
AOrdDefNote1.Text := AOrdDefNote1.Text + 'Ź:' + FRulePieceNo + #13;
@@ -1328,62 +877,14 @@ begin
end;
-//
procedure TfrmMachRollMain.setFormCtrol();
begin
- if cds_params.fieldbyName('dabao').AsString = '' then
- begin
- dxLayoutItem_packno.Visible := true;
- Tv3PacketNo.Visible := true;
- //
- if (trim(cds_params.fieldbyName('packPostAction').AsString) <> 'Զ') then
- begin
- dxLayoutItem_packpost.Visible := true;
- end
- else
- dxLayoutItem_packpost.Visible := false;
- //
- if cds_3.IsEmpty then
- edtPacketNo.Text := '1'
- else
- GetPacketNo();
- end
- else
- begin
- dxLayoutItem_packno.Visible := false;
- Tv3PacketNo.Visible := false;
- dxLayoutItem_packpost.Visible := false;
- edtPacketNo.Text := '';
- end;
- //
+
if cds_params.fieldbyName('weightRule').AsInteger = 0 then
dxLayoutItem_outweight.Caption := '[COLOR=Red][SIZE=18][/COLOR][/SIZE]'
else
dxLayoutItem_outweight.Caption := '[COLOR=Red][SIZE=18]ë[/COLOR][/SIZE]';
- if cds_params.fieldbyName('rollnoMake').AsString = 'ֶ' then
- begin
- // PieceNo.Enabled:=true;
- PieceNo.Properties.ReadOnly := false;
-
- if cds_params.fieldbyName('BeginPieceNo').AsInteger > 0 then
- begin
- PieceNo.Text := cds_params.fieldbyName('BeginPieceNo').AsString;
- end;
- //
- if (cds_params.fieldbyName('EndPieceNo').AsInteger > 0) and (cds_params.fieldbyName('BeginPieceNo').AsInteger > cds_params.fieldbyName('EndPieceNo').AsInteger) then
- begin
- dxLayoutItem_pieceorder.Visible := true;
- Edit_pieceOrder.Text := '';
- end;
-
- end
- else
- begin
- PieceNo.Properties.ReadOnly := true;
- // PieceNo.Enabled:=False;
- end;
-
FrameKeyBoard1.SpeedButton_zdykey1.Caption := gZdyKey1;
// FrameKeyBoard1.SpeedButton_zdykey2.Caption := gZdyKey2;
FrameKeyBoard1.SpeedButton_zdykey2.Caption := gZdyKey2;
@@ -1420,39 +921,6 @@ begin
end;
-procedure TfrmMachRollMain.InitCDGrid(MCIID: string);
-begin
- cxPageControl1.ActivePageIndex := 0;
- try
- CDS_2.DisableControls;
- with ADOQueryBaseTemp do
- begin
- Close;
- SQL.Clear;
- SQL.Add('select * from Trade_Cloth_Inspect_Flaw where CIID=' + QuotedStr(trim(MCIID)));
- Open;
- end;
- SCreateCDS(ADOQueryBaseTemp, CDS_2);
- SInitCDSData(ADOQueryBaseTemp, CDS_2);
- finally
- CDS_2.EnableControls;
- end;
-end;
-
-procedure TfrmMachRollMain.InitCDGridCX(MCIID: string);
-begin
- cxPageControl1.ActivePageIndex := 1;
- with ADOQueryBaseTemp do
- begin
- Close;
- SQL.Clear;
- SQL.Add('select * from Trade_Cloth_Inspect_Flaw where CIID=' + QuotedStr(trim(MCIID)));
- Open;
- end;
- SCreateCDS(ADOQueryBaseTemp, cds_1);
- SInitCDSData(ADOQueryBaseTemp, cds_1);
-end;
-
procedure TfrmMachRollMain.InitJYGrid();
var
MNetWeight, MJYLen: double;
@@ -1464,19 +932,12 @@ begin
Close;
SQL.Clear;
SQL.Add('select A.*');
- SQL.Add('from Trade_Cloth_Inspect A where BCIOID=''' + trim(FBCIOID) + '''');
+ SQL.Add('from Bs_Cloth_IO A where IOType=''ƥ'' and STKID=''' + trim(FBCIOID) + '''');
SQL.Add('order by filltime desc');
Open;
end;
SCreateCDS(ADOQueryMain, cds_3);
SInitCDSData(ADOQueryMain, cds_3);
-// if not cds_3.IsEmpty then
-// begin
-// cds_3.First;
-// PieceNo.Text := trim(cds_3.FieldByName('PieceNo').AsString); //
-// end
-// else
-// PieceNo.Text := '';
finally
cds_3.EnableControls;
@@ -1594,32 +1055,6 @@ begin
edtScanKeyPress(edtScan, mkey);
end;
-procedure TfrmMachRollMain.Edit_fixLenClick(Sender: TObject);
-begin
- inherited;
- // if trim(Edit_fixLen.Text) = '' then
- // begin
- // Edit_fixLen.Text := '';
- // end
- // else
- // begin
- // Edit_fixLen.Text := '';
- // end;
-end;
-
-procedure TfrmMachRollMain.Edit_pieceOrderClick(Sender: TObject);
-begin
- inherited;
- if trim(Edit_pieceOrder.Text) = '' then
- begin
- Edit_pieceOrder.Text := '';
- end
- else
- begin
- Edit_pieceOrder.Text := '';
- end;
-end;
-
procedure TfrmMachRollMain.edtScanDblClick(Sender: TObject);
begin
inherited;
@@ -1643,54 +1078,7 @@ begin
exit;
ClearGlobal();
- if cbbJYLX.Text = '' then
- begin
- FOperationStatus := '';
- InitPlan(edtScan.Text);
- end
- else
- begin
-
- with ADOQueryBaseTemp do
- begin
- Close;
- SQL.Clear;
- SQL.Add('select * from BS_Cloth_IO where StkId=''' + trim(edtScan.Text) + ''' and IOFlag=''''');
- Open;
-
- if not IsEmpty then
- begin
- Application.MessageBox('Ѳݲܲ!', 'ʾ', 0);
- exit;
- end;
- end;
-
- with ADO_CJ do
- begin
- Close;
- SQL.Clear;
- SQL.Add('select * from Trade_Cloth_Inspect where CIID=''' + trim(edtScan.Text) + '''');
- Open;
- if not ADO_CJ.IsEmpty then
- begin
- InitPlan(ADO_CJ.fieldbyName('BCIOID').AsString);
-
- FCIID := trim(fieldbyName('CIID').AsString);
- InputLen.Text := fieldbyName('InputLen').AsString;
- InputWeight.Text := fieldbyName('InputWeight').AsString;
- Tare.Text := fieldbyName('Tare').AsString;
- grade.ItemIndex := grade.Properties.Items.IndexOf(trim(fieldbyName('grade').AsString));
- InitCDGrid(FCIID);
- BTPrint.Caption := 'ύ';
- FOperationStatus := '';
- edtPacketNo.Enabled := False;
- end;
- end;
-
- end;
-
- frameBads1cxCheckBox_readLenPropertiesChange(frameBads1.IsSubtract);
- // Ƿȹѡ
+ InitPlan(edtScan.Text);
if trim(OrderNo.Text) <> '' then
InputLen.SetFocus;
@@ -1700,7 +1088,6 @@ end;
function TfrmMachRollMain.SaveData(): Boolean;
var
- maxno, MCIID, BZID, strsql: string;
MInputLen, MMeter, MYardage: double;
MInputWeight, MGrossWeight, MNetWeight, MTare, Maddwet, maddLen: double;
mYardStick: double;
@@ -1724,337 +1111,50 @@ begin
mpresentWeight := -1 * mpresentWeight;
end;
- if FOperationStatus = '' then
- begin
- MCIID := FCIID;
- end
- else
- begin
- MCIID := '';
- end;
try
ADOQueryBaseCmd.Connection.BeginTrans;
- if Trim(cbbJYLX.Text) = 'γ' then
- begin
- with ADOQueryBaseCmd do
- begin
- Close;
- SQL.Clear;
- SQL.Add('exec P_Trade_Insp_recheck ');
- SQL.Add(' @CIIDS=' + QuotedStr(trim(FCIID)));
- SQL.Add(',@DCode=' + QuotedStr(DCode));
- SQL.Add(',@DName=' + QuotedStr(DName));
- Open;
- end;
- if ADOQueryBaseCmd.fieldbyName('intReturn').AsInteger = -1 then
- begin
- raise Exception.create(pchar(trim(ADOQueryBaseCmd.fieldbyName('ShowMsg').AsString)));
- end;
+ MTare := strtofloatdef(trim(Tare.Text), 0); // Ƥ
+ MInputWeight := RoundFloat(strtofloatdef(trim(InputWeight.Text), 0), cds_params.fieldbyName('KgPlace').AsInteger); //
+ MGrossWeight := MInputWeight + MTare + Maddwet + mpresentWeight; // ë
+ MNetWeight := MInputWeight + Maddwet + mpresentWeight; // +
- with ADOQueryBaseCmd do
- begin
- Close;
- SQL.Clear;
- SQL.Add('update Bs_Cloth_IO set MaxRechecktime=getdate() where BCIOID=''' + trim(FBCIOID) + '''');
- ExecSQL;
- end;
-
- end;
-
- ///
- with ADOQueryBaseCmd do
- begin
- Close;
- SQL.Clear;
- SQL.Add('select * from Trade_Cloth_Inspect where CIID=''' + trim(MCIID) + '''');
- Open;
- end;
- with ADOQueryBaseCmd do
- begin
- if trim(MCIID) = '' then
- begin
- if not GetLSNo(ADOQueryBaseTemp, maxno, trim(SCXFlag), 'Trade_Cloth_Inspect', 4, 1) then
- raise Exception.create('ȡʧܣ');
- Append;
- fieldbyName('Filler').value := trim(DName);
- fieldbyName('CIID').value := trim(maxno);
- end
- else
- begin
- maxno := trim(MCIID);
- edit;
- fieldbyName('Editer').value := trim(DName);
- fieldbyName('EditTime').value := SGetServerDateTime(ADOQueryBaseTemp);
- end;
-
- fieldbyName('QtyUnit').value := Trim(FQtyUnit);
- // ϵ
- fieldbyName('Coefficient').value := strtofloatdef(trim(Coefficient.Text), 0); // ϵ
- /// ////////////////////// /////////////////////////
- if cds_params.fieldbyName('weightRule').AsInteger = 0 then
- // InputWeight ë OutPutWeight
- begin
- MTare := strtofloatdef(trim(Tare.Text), 0); // Ƥ
- MInputWeight := RoundFloat(strtofloatdef(trim(InputWeight.Text), 0), cds_params.fieldbyName('KgPlace').AsInteger); //Ϊ ë
- MGrossWeight := MInputWeight + Maddwet + mpresentWeight; // ë +
- MNetWeight := MInputWeight + Maddwet - MTare + mpresentWeight; // +
- fieldbyName('InputWeight').value := MInputWeight;
-
- //
- if MInputWeight > 0 then
- begin
- fieldbyName('NetWeight').value := MNetWeight;
- // ë
- fieldbyName('GrossWeight').value := MGrossWeight;
- end
- else
- begin
- fieldbyName('NetWeight').value := 0;
- fieldbyName('GrossWeight').value := 0;
- end;
- fieldbyName('Tare').value := MTare;
- fieldbyName('addwet').value := Maddwet;
-
- end;
-
- if cds_params.fieldbyName('weightRule').AsInteger = 1 then
- // InputWeight OutPutWeight ë
- begin
- MTare := strtofloatdef(trim(Tare.Text), 0); // Ƥ
- MInputWeight := RoundFloat(strtofloatdef(trim(InputWeight.Text), 0), cds_params.fieldbyName('KgPlace').AsInteger); //
- MGrossWeight := MInputWeight + MTare + Maddwet + mpresentWeight; // ë
- MNetWeight := MInputWeight + Maddwet + mpresentWeight; // +
- fieldbyName('InputWeight').value := MInputWeight;
-
- if MInputWeight > 0 then
- begin
- fieldbyName('NetWeight').value := MNetWeight;
- fieldbyName('GrossWeight').value := MGrossWeight;
- end
- else
- begin
- fieldbyName('NetWeight').value := 0;
- fieldbyName('GrossWeight').value := 0;
- end;
- // Ƥ
- fieldbyName('Tare').value := MTare;
- fieldbyName('addwet').value := Maddwet;
- end;
- /// ////////////////////// /////////////////////////
- ///
- /// ////////////////////// 泤 /////////////////////////
- /// = ''
- if strtofloatdef(trim(Edit_fixLen.Text), 0) > 0 then
- MInputLen := strtofloatdef(trim(Edit_fixLen.Text), 0)
- else
- MInputLen := RoundFloat(strtofloatdef(trim(InputLen.Text), 0), 4);
+ MInputLen := RoundFloat(strtofloatdef(trim(InputLen.Text), 0), 4);
// +mAddLen
- if (uppercase(lblLenUnit.CaptionOptions.Hint) = 'M') or (lblLenUnit.CaptionOptions.Hint = '') then
- begin
- MMeter := RoundFloat((MInputLen + maddLen + mPresentLen) / (mYardStick / 100), cds_params.fieldbyName('MPlace').AsInteger);
- MYardage := RoundFloat(MMeter / 0.9144, cds_params.fieldbyName('YPlace').AsInteger);
- end
- else
- begin
- MYardage := RoundFloat((MInputLen + maddLen + mPresentLen) / (mYardStick / 100), cds_params.fieldbyName('YPlace').AsInteger);
- MMeter := RoundFloat(MYardage * 0.9144, cds_params.fieldbyName('MPlace').AsInteger);
- end;
-
- fieldbyName('InputLen').value := RoundFloat(strtofloatdef(trim(InputLen.Text), 0), 2);
- fieldbyName('Meter').value := MMeter;
- fieldbyName('Yardage').value := MYardage;
- fieldbyName('LenUnit').value := trim(lblLenUnit.CaptionOptions.Hint);
- fieldbyName('AddLen').value := maddLen;
- fieldbyName('YardStick').value := mYardStick;
-
- /// ////////////////////// 泤 /////////////////////////
- // if Trim(Edit_zp.Text) <> '' then
- // begin
- fieldbyName('Grade').value := trim(grade.Text);
- // end;
- // if Trim(Edit_cp.Text) <> '' then
- // begin
- // FieldByName('Grade').Value := 'Ʒ';
- // end;
- if FOperationStatus <> '' then
- begin
- fieldbyName('PieceNo').value := 0;
- end;
-
- // ֶ
- if (FRulePieceNo = 'ֶ') or (FRulePieceNo = 'ֶ') or (cds_params.fieldbyName('rollnoMake').AsString = 'ֶ') then
- begin
- fieldbyName('PieceNo').value := strtoint(trim(PieceNo.Text));
- end;
-
- fieldbyName('status').value := '0';
- fieldbyName('OrderNo').value := trim(FOrderNo);
- fieldbyName('MainId').value := trim(FMainId);
- fieldbyName('SubId').value := trim(FSubId);
- fieldbyName('ConNo').value := trim(FConNo);
- fieldbyName('ConMId').value := trim(FConMId);
- fieldbyName('ConSId').value := trim(FConSId);
- fieldbyName('BCIOID').value := trim(FBCIOID);
- fieldbyName('Workshop').value := trim(FWorkshop);
- if dxLayoutItem_rk.Visible then
- fieldbyName('CIIOFlag').value := 'δ'
- else
- fieldbyName('CIIOFlag').value := '';
- fieldbyName('C_Code').value := FC_Code;
- fieldbyName('C_Name').value := FC_Name;
- fieldbyName('C_EName').value := FC_EName;
- fieldbyName('BatchNO').value := BatchNO.Text;
- fieldbyName('FtyPCId').value := FtyPCId.Text; // ԭ
- fieldbyName('C_Spec').value := FC_Spec;
- fieldbyName('C_Color').value := FC_Color;
- fieldbyName('C_EColor').value := FC_EColor;
- fieldbyName('C_ColorNo').value := FC_ColorNo;
- fieldbyName('C_StyleNo').value := FC_StyleNo;
- fieldbyName('C_Composition').value := FC_Composition;
- if dxLayoutItem_width.ActuallyVisible then
- fieldbyName('C_Width').value := trim(C_width.Text)
- else
- fieldbyName('C_Width').value := FC_Width;
-
- if dxLayoutItem_gram.ActuallyVisible then
- fieldbyName('C_GramWeight').value := trim(C_GramWeight.Text)
- else
- fieldbyName('C_GramWeight').value := FC_GramWeight;
-
- fieldbyName('C_Pattern').value := FC_Pattern;
- fieldbyName('C_CustPattern').value := FC_CustPattern;
- fieldbyName('C_ColorDepth').value := FC_ColorDepth;
- fieldbyName('CIMachNo').value := trim(SCXFlag);
-
- //
-
- fieldbyName('AddwetVirtual').value := fAddwetVirtual;
- fieldbyName('AddLenVirtual').value := fAddLenVirtual;
-
- fieldbyName('AddwetPresent').value := abs(mpresentWeight);
- // cds_params.fieldbyName('AddwetPresent').AsFloat;
- fieldbyName('AddLenPresent').value := abs(mPresentLen);
- // cds_params.fieldbyName('AddLenPresent').AsFloat;
- //Զ1
- fieldbyName('customStrField1').value := trim(customStrField1.Text);
- fieldbyName('customStrField2').value := trim(customStrField2.Text);
-
- //ƴƥ
- if FieldList.FieldByName('unitPieces') <> nil then
- fieldbyName('unitPieces').value := funitPiecesStr;
- //̨Ա
- if FieldList.FieldByName('operators') <> nil then
- fieldbyName('operators').value := gMachOperators;
-
- Post;
- end;
-
- MCIID := trim(maxno);
- FCIID := trim(maxno);
-
- /// /////////////// õϢ //////////////////
- with CDS_2 do
+ if (uppercase(lblLenUnit.CaptionOptions.Hint) = 'M') or (lblLenUnit.CaptionOptions.Hint = '') then
begin
- First;
- while not eof do
- begin
- if trim(CDS_2.fieldbyName('CIFID').AsString) = '' then
- begin
- if not GetLSNo(ADOQueryBaseTemp, maxno, 'JC', 'Trade_Cloth_Inspect_Flaw', 5, 1) then
- raise Exception.create('ȡõʧܣ');
- end
- else
- begin
- maxno := trim(CDS_2.fieldbyName('CIFID').AsString);
- end;
- with ADOQueryBaseCmd do
- begin
- Close;
- SQL.Clear;
- SQL.Add('select * from Trade_Cloth_Inspect_Flaw ');
- SQL.Add(' where CIFID=''' + trim(maxno) + '''');
- Open;
- end;
- with ADOQueryBaseCmd do
- begin
- if trim(CDS_2.fieldbyName('CIFID').AsString) = '' then
- Append
- else
- edit;
- RTSetSaveDataCDS(ADOQueryBaseCmd, Tv2, CDS_2, 'Trade_Cloth_Inspect_Flaw', 0);
- fieldbyName('CIID').value := trim(MCIID);
- fieldbyName('CIFID').value := trim(maxno);
- Post;
- end;
- CDS_2.edit;
- CDS_2.fieldbyName('CIID').value := trim(MCIID);
- CDS_2.fieldbyName('CIFID').value := trim(maxno);
- next;
- end;
+ MMeter := RoundFloat((MInputLen + maddLen + mPresentLen) / (mYardStick / 100), cds_params.fieldbyName('MPlace').AsInteger);
+ MYardage := RoundFloat(MMeter / 0.9144, cds_params.fieldbyName('YPlace').AsInteger);
+ end
+ else
+ begin
+ MYardage := RoundFloat((MInputLen + maddLen + mPresentLen) / (mYardStick / 100), cds_params.fieldbyName('YPlace').AsInteger);
+ MMeter := RoundFloat(MYardage * 0.9144, cds_params.fieldbyName('MPlace').AsInteger);
end;
- /// /////////////// õϢ //////////////////
- ///
- /// /////////////// ¾ŴõϢ //////////////////
+
with ADOQueryBaseCmd do
begin
Close;
- SQL.Clear;
- SQL.Add('exec P_Trade_Insp_Up_pack @CIID=''' + trim(MCIID) + '''');
- if FOperationStatus = '' then
- SQL.Add(',@InspType=' + QuotedStr('첼'))
- else
- SQL.Add(',@InspType=' + QuotedStr(''));
- if (cds_params.fieldbyName('rollnoMake').AsString = 'ֶ') then
- begin
- SQL.Add(',@RulePieceNo=' + QuotedStr('ֶ')); // ɹ
- end
- else
- begin
- SQL.Add(',@RulePieceNo=' + QuotedStr(FRulePieceNo)); // ɹ
- end;
- ExecSQL;
+ sql.Clear;
+ Sql.Add('exec P_BS_Cloth_Out_Split ');
+ 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(' ,@Dcode=' + quotedstr(Trim(Dcode)));
+ Sql.Add(' ,@DName=' + quotedstr(Trim(DName)));
+ open;
end;
- //жǷظ
- if not checkPicecNo() then
+ if ADOQueryBaseCmd.fieldbyName('intReturn').AsInteger = -1 then
begin
-
- exit;
+ raise Exception.create(pchar(trim(ADOQueryBaseCmd.fieldbyName('ShowMsg').AsString)));
end;
- /// /////////////// ¾ŴõϢ //////////////////
- ///
- /// /////////////// ¿ //////////////////
- with ADOQueryBaseCmd do
- begin
- Close;
- SQL.Clear;
- SQL.Add('insert into Trade_Need_Up(UOperation,UType,UDataId,uoperator) values('''',''̨'',' + QuotedStr(maxno) + ',' + QuotedStr(DName) + ') ');
- ExecSQL;
- end;
- /// /////////////// ¿ //////////////////
- ///
+ FCIID := trim(trim(ADOQueryBaseCmd.fieldbyName('MaxIOID2').AsString));
+
ADOQueryBaseCmd.Connection.CommitTrans;
- /// /////////////// ⼰ //////////////////
-// with ADOQueryBaseCmd do
-// begin
-// Close;
-// SQL.Clear;
-// SQL.Add('exec P_Trade_Insp_In_Stk @CIID=''' + trim(MCIID) + '''');
-// ExecSQL;
-// end;
- // Open;
- // end;
- // if ADOCmd.FieldByName('intReturn').AsInteger = -1 then
- // begin
- // application.MessageBox(PChar(trim(ADOCmd.FieldByName('ShowMsg').AsString)), 'ʾϢ', 0);
- // Result := False;
- // end
- // else
- // begin
- // Result := True;
- // end;
- /// /////////////// ⼰ //////////////////
Result := true;
except
@@ -2128,123 +1228,8 @@ begin
end;
end;
-//
-
-procedure TfrmMachRollMain.PrintBao(PPacketId: string; againPring: Boolean = false);
-var
- fPrintFile: string;
- Txt, fImagePath: string;
- Moudle: Thandle;
- Makebar: TMakebar;
- Mixtext: TMixtext;
-begin
- with ADOQueryPrint do
- begin
- Close;
- SQL.Clear;
- SQL.Add('exec P_Trade_Insp_Prt_PackLab ' + QuotedStr(PPacketId));
- Open;
- end;
-
- if trim(ADOQueryPrint.fieldbyName('SLabPackage').AsString) <> '' then
- fLabPackage := trim(ADOQueryPrint.fieldbyName('SLabPackage').AsString)
- else
- fLabPackage := ADOQueryPrint.fieldbyName('LabPackage').AsString;
-
- ExportFtErpFile(trim(fLabPackage) + '.rmf', ADOQueryBaseTemp);
- fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + trim(fLabPackage) + '.rmf';
- if not FileExists(fPrintFile) then
- begin
- Application.MessageBox(pchar('ûҰǩ' + fPrintFile), 'ʾ', 0);
- exit;
- end;
- if FileExists(fPrintFile) then
- begin
- RM1.LoadFromFile(fPrintFile);
- RM1.DefaultCopies := cds_params.fieldbyName('packlabnumber').AsInteger;
- if cds_params.fieldByName('packPrintPreview').AsBoolean then
- RM1.ShowReport
- else
- RM1.PrintReport;
- end;
-
- if againPring then
- begin
- with ADOQueryBaseCmd do
- begin
- Close;
- SQL.Clear;
- SQL.Add('insert into Trade_Need_Up(UType,UOperation,UDataId,uoperator) values('''',''شǩ'',' + QuotedStr(trim(cds_3.fieldbyName('CIID').AsString)) + ',' + QuotedStr(DName) + ') ');
- ExecSQL;
- end;
- end;
-
- if FileExists(fImagePath) then
- DeleteFile(fImagePath);
-
-end;
-
-procedure TfrmMachRollMain.InitJTM(MCIID: string);
-begin
- with ADOQueryBaseTemp do
- begin
- Close;
- SQL.Clear;
- SQL.Add('select * from BS_Cloth_IO where StkId=''' + trim(MCIID) + ''' and IOFlag=''''');
- Open;
-
- if not IsEmpty then
- begin
- Application.MessageBox('Ѳݲܲ!', 'ʾ', 0);
- exit;
- end;
- end;
- //
- with ADOQueryBaseTemp do
- begin
- Close;
- SQL.Clear;
- SQL.Add('select * from BS_Cloth_IO where StkId=''' + trim(MCIID) + ''' and IOFlag=''''');
- Open;
- end;
- if not ADOQueryBaseTemp.IsEmpty then
- begin
- Application.MessageBox('Ѳݲܲ!', 'ʾ', 0);
- exit;
- end;
- with ADOQueryBaseTemp do
- begin
- Close;
- SQL.Clear;
- SQL.Add('select * from Trade_Cloth_Inspect where CIID=''' + trim(MCIID) + '''');
- Open;
- end;
- if not ADOQueryBaseTemp.IsEmpty then
- begin
- FOperationStatus := '';
- FCIID := MCIID;
- InitCDGrid(MCIID);
- end;
-
-end;
-
-//
-
procedure TfrmMachRollMain.BadSpeedButtonClick(Sender: TObject);
-var
- i: Integer;
begin
- inherited;
- if CheckData('õ') = false then
- exit;
- frameBads1.dxPanel1.Visible := true;
- FCIFName := trim(TSpeedButton(Sender).Hint);
-
- frameBads1.lblCIFName.Caption := trim(TSpeedButton(Sender).Hint);
-
- frameBads1.CIFNumber.SetFocus;
-
- frameBads1cxCheckBox_readLenPropertiesChange(frameBads1.IsSubtract);
end;
@@ -2320,75 +1305,6 @@ begin
end;
end;
-/// ////////////
-procedure TfrmMachRollMain.initEditPiece();
-begin
- if BTPrint.Caption = ' ' then
- begin
- BTPrint.Caption := 'ύ';
- with cds_3 do
- begin
- InputLen.Text := fieldbyName('InputLen').AsString;
- InputWeight.Text := fieldbyName('InputWeight').AsString;
- Tare.Text := fieldbyName('Tare').AsString;
- grade.ItemIndex := grade.Properties.Items.IndexOf(trim(fieldbyName('grade').AsString));
- // Coefficient.Text:=fieldByName('Coefficient').AsString;
- end;
-
- edtPacketNo.Enabled := False;
- end
- else
- begin
- BTPrint.Caption := ' ';
- InputLen.Text := '';
- InputWeight.Text := '';
- OutPutWeight.Text := '';
- edtPacketNo.Enabled := true;
- grade.ItemIndex := 0;
- cds_params.edit;
- cds_params.fieldbyName('chen').value := '1';
- cds_params.fieldbyName('mabiao').value := '1';
- cds_params.Post;
- end;
-
-end;
-
-procedure TfrmMachRollMain.GetPacketNo();
-var
- mMaxPacketNo: string;
-begin
- try
- with ADOQueryBaseTemp do
- begin
- Close;
- SQL.Clear;
- SQL.Add('select max(cast(isnull(PacketNo,''0'') as int) )+1 as MaxPacketNo from Bs_Cloth_IO ');
- SQL.Add('where OrderNo=' + QuotedStr(trim(OrderNo.Text)));
-
- Open;
- end;
- mMaxPacketNo := trim(ADOQueryBaseTemp.fieldbyName('MaxPacketNo').AsString);
- if mMaxPacketNo = '' then
- mMaxPacketNo := '1';
-
- edtPacketNo.Text := mMaxPacketNo;
- except
-
- end;
-
-end;
-
-procedure TfrmMachRollMain.getPlanImage(MSubID: string);
-begin
- with ADOQueryImage do
- begin
- close;
- sql.Clear;
- sql.Add('select top 1 * from TP_File A');
- sql.Add('where WBID=' + quotedstr(MSubID));
- open;
- end;
-end;
/////////////////////////////////////
function TfrmMachRollMain.deletePack(packId: string): boolean;
@@ -2432,10 +1348,6 @@ begin
raise Exception.create(pchar(trim(ADOQueryBaseCmd.fieldbyName('ShowMsg').AsString)));
end;
ADOQueryBaseCmd.Connection.CommitTrans;
- if inttostr(packNo + 1) = trim(edtPacketNo.Text) then
- begin
- edtPacketNo.Text := inttostr(packNo);
- end;
InitJYGrid();
Application.MessageBox('ɾɹ', 'ʾϢ');
@@ -2445,82 +1357,5 @@ begin
end;
end;
-//////////////////////////////////////////////////////
-///
-function TfrmMachRollMain.checkPicecNo(): boolean;
-var
- pieceNo: string;
-begin
- result := false;
- if FRulePieceNo = '' then
- begin
- ADOQueryBaseCmd.Connection.RollbackTrans;
- showMessage('ƻδþɹ!');
- exit;
- end;
- try
- //////////////////ظж
- with ADOQueryBaseCmd do
- begin
- Close;
- sql.Clear;
- if FRulePieceNo = '' then
- begin
- sql.Add('select Mainid,pieceNo from Trade_Cloth_Inspect X where X.mainID=' + quotedstr(Trim(FMainId)));
- sql.Add(' Group by Mainid,pieceNo having count(*)>1');
- end
- else if FRulePieceNo = '' then
- begin
- sql.Add('select mainId,C_color,batchNo,pieceNo from Trade_Cloth_Inspect X ');
- sql.Add('where X.mainID=''' + Trim(FMainId) + ''' and X.c_color=' + quotedstr(Trim(FC_Color)) + ' and isnull(X.BatchNO,'''')=' + quotedstr(Trim(BatchNO.Text)));
- sql.Add(' Group by mainId,C_color,BatchNO,pieceNo having count(*)>1');
- end
- else if FRulePieceNo = 'ɫ' then
- begin
- sql.Add('select mainId,C_color,pieceNo from Trade_Cloth_Inspect X ');
- sql.Add('where X.mainID=''' + Trim(FMainId) + ''' and X.c_color=' + quotedstr(Trim(FC_Color)));
- sql.Add(' Group by mainId,C_color,pieceNo having count(*)>1');
- end;
-
- Open;
- end;
- if not ADOQueryBaseCmd.IsEmpty then
- begin
- ADOQueryBaseCmd.Connection.RollbackTrans;
- pieceNo := Trim(ADOQueryBaseCmd.fieldbyname('pieceNo').AsString);
- if fileexists(ExtractFilePath(Application.ExeName) + 'ظ.wav') then
- PlaySound('ظ.wav', 0, SND_FILENAME or SND_ASYNC);
- Application.MessageBox(Pchar(': ' + Trim(pieceNo) + ' ظ˶Դ!'), 'ʾ', 0);
- Exit;
- end;
- //
- result := true;
- except
- ADOQueryBaseCmd.Connection.RollbackTrans;
- Application.MessageBox(Pchar('жϾǷظʱ!'), 'ʾ', 0);
- end;
-
-end;
-
-/////////////////////////////////////////////////////////////////
-///
-function TfrmMachRollMain.getCurPieceNO(mCcid: string): string;
-begin
- result := '';
- try
- with ADOQueryBaseTemp do
- begin
- close;
- sql.Clear;
- sql.Add('select PieceNo from Trade_Cloth_Inspect where CIID=' + quotedstr(mCcid));
- open;
- if ADOQueryBaseTemp.fieldByName('PieceNo').AsInteger > 0 then
- result := intTostr(ADOQueryBaseTemp.fieldByName('PieceNo').AsInteger + 1);
- end;
- except
- application.MessageBox('ȡǰʱ!', 'ʾϢ', 0);
- end;
-end;
-
end.