diff --git a/F01染色�布仓库/U_DyeGreyClothStkStats.dfm b/F01染色�布仓库/U_DyeGreyClothStkStats.dfm
index 44963da..fc34e8e 100644
--- a/F01染色�布仓库/U_DyeGreyClothStkStats.dfm
+++ b/F01染色�布仓库/U_DyeGreyClothStkStats.dfm
@@ -173,6 +173,7 @@ inherited frmDyeGreyClothStkStats: TfrmDyeGreyClothStkStats
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 2
+ ExplicitTop = 111
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
diff --git a/F01染色�布仓库/U_DyePlanForCardSel.dfm b/F01染色�布仓库/U_DyePlanForCardSel.dfm
index ad4d8b6..011af44 100644
--- a/F01染色�布仓库/U_DyePlanForCardSel.dfm
+++ b/F01染色�布仓库/U_DyePlanForCardSel.dfm
@@ -310,7 +310,7 @@ object frmProductOrderListSel: TfrmProductOrderListSel
DataBinding.FieldName = 'ORDNOTE'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
- Width = 66
+ Width = 103
end
end
object cxGrid1Level1: TcxGridLevel
diff --git a/F02染色计划�/DyePlan.identcache b/F02染色计划�/DyePlan.identcache
index ca8823e..bc3eb50 100644
Binary files a/F02染色计划�/DyePlan.identcache and b/F02染色计划�/DyePlan.identcache differ
diff --git a/F02染色计划�/U_DyePlanCardList.dfm b/F02染色计划�/U_DyePlanCardList.dfm
index a769847..867625f 100644
--- a/F02染色计划�/U_DyePlanCardList.dfm
+++ b/F02染色计划�/U_DyePlanCardList.dfm
@@ -389,7 +389,7 @@ inherited frmDyePlanCardList: TfrmDyePlanCardList
Align = alClient
PopupMenu = PM_1
TabOrder = 2
- ExplicitLeft = 8
+ ExplicitTop = 111
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
diff --git a/F02染色计划�/U_DyeTechnicsinput.dfm b/F02染色计划�/U_DyeTechnicsinput.dfm
index 5ec4e66..c11c0a6 100644
--- a/F02染色计划�/U_DyeTechnicsinput.dfm
+++ b/F02染色计划�/U_DyeTechnicsinput.dfm
@@ -176,7 +176,7 @@ inherited frmDyeTechnicsinput: TfrmDyeTechnicsinput
PopupMenu = PM_1
TabOrder = 0
ExplicitLeft = 5
- ExplicitTop = 119
+ ExplicitTop = 105
object TV1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
diff --git a/F04染色刷�/DyeProcess.identcache b/F04染色刷�/DyeProcess.identcache
index 2a2ecb3..b91d74e 100644
Binary files a/F04染色刷�/DyeProcess.identcache and b/F04染色刷�/DyeProcess.identcache differ
diff --git a/F04染色刷�/U_DyeOutputList.dfm b/F04染色刷�/U_DyeOutputList.dfm
index 529be53..4cb6204 100644
--- a/F04染色刷�/U_DyeOutputList.dfm
+++ b/F04染色刷�/U_DyeOutputList.dfm
@@ -169,12 +169,11 @@ inherited frmDyeOutputList: TfrmDyeOutputList
Caption = #19994#21153#21592
end
object Label4: TLabel
- Left = 876
- Top = 17
- Width = 24
+ Left = 414
+ Top = 12
+ Width = 48
Height = 13
- Caption = #39068#33394
- Visible = False
+ Caption = #25104#21697#21517#31216
end
object Label6: TLabel
Left = 876
@@ -253,14 +252,13 @@ inherited frmDyeOutputList: TfrmDyeOutputList
TabOrder = 5
OnChange = KaZuChange
end
- object C_Color: TEdit
+ object C_Name: TEdit
Tag = 2
- Left = 902
- Top = 13
+ Left = 467
+ Top = 8
Width = 80
Height = 21
TabOrder = 6
- Visible = False
OnChange = KaZuChange
end
object C_ColorNo: TEdit
@@ -333,7 +331,6 @@ inherited frmDyeOutputList: TfrmDyeOutputList
Height = 482
Align = alClient
TabOrder = 2
- ExplicitLeft = 8
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@@ -627,6 +624,8 @@ inherited frmDyeOutputList: TfrmDyeOutputList
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_DyeProcess.ADOLink
+ Left = 73
+ Top = 145
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_DyeProcess.ADOLink
diff --git a/F04染色刷�/U_DyeOutputList.pas b/F04染色刷�/U_DyeOutputList.pas
index f8fe110..7976d97 100644
--- a/F04染色刷�/U_DyeOutputList.pas
+++ b/F04染色刷�/U_DyeOutputList.pas
@@ -56,7 +56,7 @@ type
Tv1Column8: TcxGridDBColumn;
Tv1Column11: TcxGridDBColumn;
Tv1Column12: TcxGridDBColumn;
- C_Color: TEdit;
+ C_Name: TEdit;
Label4: TLabel;
C_ColorNo: TEdit;
Label6: TLabel;
diff --git a/F04染色刷�/U_DyePCDetailsList.dfm b/F04染色刷�/U_DyePCDetailsList.dfm
index 02b8f88..89fe53f 100644
--- a/F04染色刷�/U_DyePCDetailsList.dfm
+++ b/F04染色刷�/U_DyePCDetailsList.dfm
@@ -121,6 +121,7 @@ inherited frmDyePCDetailsList: TfrmDyePCDetailsList
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 1
+ ExplicitLeft = -1
object Label3: TLabel
Left = 260
Top = 10
@@ -803,7 +804,6 @@ inherited frmDyePCDetailsList: TfrmDyePCDetailsList
Align = alClient
PopupMenu = PM_2
TabOrder = 1
- ExplicitTop = 6
object Tv2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
diff --git a/F05染色检验/DyeInsp.dproj.local b/F05染色检验/DyeInsp.dproj.local
index d430e61..19dd401 100644
--- a/F05染色检验/DyeInsp.dproj.local
+++ b/F05染色检验/DyeInsp.dproj.local
@@ -26,14 +26,14 @@
1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_LablePrint.dfm=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.dfm
1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas
1899-12-30 00:00:00.000.909,=D:\Dp10Repo\项目代ç �\RTBasics\F05染色检验\U_DyeClothInspList.pas
- 1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas
1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas
+ 1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas
1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_EmployeeSel.pas
1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代ç �\ç�¿ç‰¹\æ–°DLLåˆ�始化(CSH.dll)\U_ZDYHelpSel.pas=
1899-12-30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas
1899-12-30 00:00:00.000.471,=D:\Dp10Repo\项目代ç �\D10sxYilanbuyi\F05染色检验\U_DyeCardRoll.pas
1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_ClothInfoSel.pas
- 1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas
+ 1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas
diff --git a/F05染色检验/DyeInspLogin.res b/F05染色检验/DyeInspLogin.res
index 4f01e9d..5873677 100644
Binary files a/F05染色检验/DyeInspLogin.res and b/F05染色检验/DyeInspLogin.res differ
diff --git a/F05染色检验/U_DyeCardRoll.dfm b/F05染色检验/U_DyeCardRoll.dfm
index ef4e779..7064425 100644
--- a/F05染色检验/U_DyeCardRoll.dfm
+++ b/F05染色检验/U_DyeCardRoll.dfm
@@ -481,6 +481,20 @@ inherited frmDyeCardRoll: TfrmDyeCardRoll
HeaderAlignmentHorz = taCenter
Width = 80
end
+ object Tv1filler: TcxGridDBColumn
+ Caption = #30331#35760#20154
+ DataBinding.FieldName = 'filler'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 80
+ end
+ object Tv1fillTime: TcxGridDBColumn
+ Caption = #30331#35760#26102#38388
+ DataBinding.FieldName = 'fillTime'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 80
+ end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
diff --git a/F05染色检验/U_DyeCardRoll.pas b/F05染色检验/U_DyeCardRoll.pas
index ff69020..fa5d8a6 100644
--- a/F05染色检验/U_DyeCardRoll.pas
+++ b/F05染色检验/U_DyeCardRoll.pas
@@ -87,6 +87,8 @@ type
ToolButton3: TToolButton;
N3: TMenuItem;
N4: TMenuItem;
+ Tv1fillTime: TcxGridDBColumn;
+ Tv1filler: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
diff --git a/F05染色检验/testDll.res b/F05染色检验/testDll.res
index e116c48..2465ca0 100644
Binary files a/F05染色检验/testDll.res and b/F05染色检验/testDll.res differ
diff --git a/F06染色��仓库/DyeClothStk.dpr b/F06染色��仓库/DyeClothStk.dpr
index 9fdc96b..b54bd18 100644
--- a/F06染色��仓库/DyeClothStk.dpr
+++ b/F06染色��仓库/DyeClothStk.dpr
@@ -32,7 +32,9 @@ uses
U_DyePlanSel in '..\F00ȾɫͨÓô°Ìå\U_DyePlanSel.pas' {frmDyePlanSel},
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
U_DyeClothOutPut in 'U_DyeClothOutPut.pas' {frmDyeClothOutPut},
- U_DyeClothStkSel in 'U_DyeClothStkSel.pas' {frmDyeClothStkSel};
+ U_DyeClothStkSel in 'U_DyeClothStkSel.pas' {frmDyeClothStkSel},
+ U_DyeCPImport in 'U_DyeCPImport.pas' {frmDyeCPImport},
+ U_DyePlanForCardSel in 'U_DyePlanForCardSel.pas' {frmProductOrderListSel};
{$R *.res}
diff --git a/F06染色��仓库/DyeClothStk.dproj b/F06染色��仓库/DyeClothStk.dproj
index e921ed9..af2c90d 100644
--- a/F06染色��仓库/DyeClothStk.dproj
+++ b/F06染色��仓库/DyeClothStk.dproj
@@ -166,6 +166,14 @@
dfm
+
+
+ dfm
+
+
+
+ dfm
+
Cfg_2
Base
diff --git a/F06染色��仓库/DyeClothStk.dproj.local b/F06染色��仓库/DyeClothStk.dproj.local
index 460fdab..421180d 100644
--- a/F06染色��仓库/DyeClothStk.dproj.local
+++ b/F06染色��仓库/DyeClothStk.dproj.local
@@ -1,45 +1,47 @@

- 1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_LablePrint.dfm
1899-12-30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas
1899-12-30 00:00:00.000.642,=D:\Dp10Repo\项目代ç �\D10sxYilanbuyi\F06染色æˆ�å“�仓库\U_DyeClothOutPut.pas
1899-12-30 00:00:00.000.443,=D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\U_DyeClothWaitStorage.pas
- 1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_AttachmentUpload.pas
- 1899-12-30 00:00:00.000.144,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas
+ 1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_LablePrint.dfm
+ 1899-12-30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas
1899-12-30 00:00:00.000.420,D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\DyeClothStk.dproj=D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\InformationBase.dproj
1899-12-30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas
1899-12-30 00:00:00.000.982,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_LbaelMapSet.pas
- 1899-12-30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas
- 1899-12-30 00:00:00.000.783,D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\Unit1.pas=
+ 1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_AttachmentUpload.pas
+ 1899-12-30 00:00:00.000.924,=D:\Dp10Repo\项目代ç �\D10sxYilanbuyi\F06染色æˆ�å“�仓库\U_DyeCPImport.pas
1899-12-30 00:00:00.000.615,D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\U_DyeClothInEdit.dfm=D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\U_DyeClothOutEdit.dfm
+ 1899-12-30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas
+ 1899-12-30 00:00:00.000.783,D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\Unit1.pas=
1899-12-30 00:00:00.000.339,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_ClothInfoSel.pas
1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas
- 1899-12-30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas
+ 1899-12-30 00:00:00.000.004,=D:\Dp10Repo\项目代ç �\D10sxYilanbuyi\F06染色æˆ�å“�仓库\U_DyePlanForCardSel.pas
1899-12-30 00:00:00.000.135,D:\Dp10Repo\项目代ç �\ç�¿ç‰¹\æ–°DLLåˆ�始化(CSH.dll)\U_ZDYHelp.pas=
1899-12-30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas
1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.dfm
1899-12-30 00:00:00.000.493,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用模æ�¿\Unit1.pas
- 1899-12-30 00:00:00.000.716,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_ProcessSel.pas
+ 1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_EmployeeSel.pas
1899-12-30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas
1899-12-30 00:00:00.000.736,D:\Dp10Repo\项目代ç �\ç�¿ç‰¹\æ–°DLLåˆ�始化(CSH.dll)\U_ModuleNote.pas=
1899-12-30 00:00:00.000.944,=D:\Dp10Repo\项目代ç �\D10sxYilanbuyi\F06染色æˆ�å“�仓库\U_DyeClothStkSel.pas
1899-12-30 00:00:00.000.710,=D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\U_DyeClothIOFlow.pas
- 1899-12-30 00:00:00.000.361,=D:\Dp10Repo\项目代ç �\RTBasics\F00染色通用窗体\U_DyePlanSel.pas
+ 1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_LablePrint.pas
1899-12-30 00:00:00.000.537,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_LabelMapSet.pas
1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas
1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas
1899-12-30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas
- 1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas
+ 1899-12-30 00:00:00.000.361,=D:\Dp10Repo\项目代ç �\RTBasics\F00染色通用窗体\U_DyePlanSel.pas
1899-12-30 00:00:00.000.615,D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\U_DyeClothInEdit.pas=D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\U_DyeClothOutEdit.pas
1899-12-30 00:00:00.000.845,=D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\U_DyeClothInEdit.pas
- 1899-12-30 00:00:00.000.755,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_LabelPrint.pas
1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代ç �\ç�¿ç‰¹\æ–°DLLåˆ�始化(CSH.dll)\U_ZDYHelpSel.pas=
- 1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_EmployeeSel.pas
+ 1899-12-30 00:00:00.000.144,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas
+ 1899-12-30 00:00:00.000.716,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_ProcessSel.pas
+ 1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas
1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas
- 1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_LablePrint.pas
1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_CompanySel.pas
1899-12-30 00:00:00.000.045,=D:\Dp10Repo\项目代ç �\RTBasics\F06染色æˆ�å“�仓库\U_DyeClothPSI.pas
+ 1899-12-30 00:00:00.000.755,=D:\Dp10Repo\项目代ç �\RTBasics\A00通用窗体\U_LabelPrint.pas
@@ -95,5 +97,9 @@
+
+
+
+
diff --git a/F06染色��仓库/DyeClothStk.identcache b/F06染色��仓库/DyeClothStk.identcache
index f68b7c0..e81580e 100644
Binary files a/F06染色��仓库/DyeClothStk.identcache and b/F06染色��仓库/DyeClothStk.identcache differ
diff --git a/F06染色��仓库/U_DyeCPImport.dfm b/F06染色��仓库/U_DyeCPImport.dfm
new file mode 100644
index 0000000..c623c44
--- /dev/null
+++ b/F06染色��仓库/U_DyeCPImport.dfm
@@ -0,0 +1,218 @@
+inherited frmDyeCPImport: TfrmDyeCPImport
+ Left = 189
+ Top = 138
+ Caption = #22383#24067#20837#24211#23548#20837
+ ClientHeight = 562
+ ClientWidth = 1484
+ Color = clWhite
+ Font.Charset = ANSI_CHARSET
+ Font.Height = -16
+ Font.Name = #24494#36719#38597#40657
+ Position = poMainFormCenter
+ OnKeyDown = FormKeyDown
+ ExplicitWidth = 1500
+ ExplicitHeight = 601
+ PixelsPerInch = 107
+ TextHeight = 21
+ object ToolBar1: TToolBar [0]
+ Tag = 1
+ Left = 0
+ Top = 0
+ Width = 1484
+ Height = 38
+ AutoSize = True
+ ButtonHeight = 38
+ ButtonWidth = 107
+ Caption = 'ToolBar1'
+ Color = clSkyBlue
+ Images = DataLink_DyeClothStk.ImageList_new32
+ List = True
+ ParentColor = False
+ ShowCaptions = True
+ TabOrder = 0
+ object TBRafresh: TToolButton
+ Left = 0
+ Top = 0
+ AutoSize = True
+ Caption = #21047#26032
+ ImageIndex = 1
+ OnClick = TBRafreshClick
+ end
+ object TbSelFile: TToolButton
+ Left = 79
+ Top = 0
+ AutoSize = True
+ Caption = #36873#25321#25991#20214
+ ImageIndex = 12
+ OnClick = TbSelFileClick
+ end
+ object ToolButton3: TToolButton
+ Left = 190
+ Top = 0
+ AutoSize = True
+ Caption = #21024#38500
+ ImageIndex = 14
+ OnClick = ToolButton3Click
+ end
+ object ToolButton2: TToolButton
+ Left = 269
+ Top = 0
+ AutoSize = True
+ Caption = #23548#20837#25968#25454
+ ImageIndex = 16
+ OnClick = ToolButton2Click
+ end
+ object ToolButton1: TToolButton
+ Left = 380
+ Top = 0
+ AutoSize = True
+ Caption = #20445#23384#26684#24335
+ ImageIndex = 16
+ OnClick = ToolButton1Click
+ end
+ object TBClose: TToolButton
+ Left = 491
+ Top = 0
+ AutoSize = True
+ Caption = #20851#38381
+ ImageIndex = 7
+ OnClick = TBCloseClick
+ end
+ end
+ object cxGrid1: TcxGrid [1]
+ Left = 0
+ Top = 38
+ Width = 1484
+ Height = 524
+ Align = alClient
+ TabOrder = 1
+ object Tv1: TcxGridDBTableView
+ Navigator.Buttons.CustomButtons = <>
+ Navigator.Buttons.Delete.Enabled = False
+ Navigator.Buttons.Delete.Visible = False
+ ScrollbarAnnotations.CustomAnnotations = <>
+ DataController.DataSource = DS_1
+ DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
+ DataController.Summary.DefaultGroupSummaryItems = <>
+ DataController.Summary.FooterSummaryItems = <
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ end>
+ DataController.Summary.SummaryGroups = <>
+ OptionsBehavior.GoToNextCellOnEnter = True
+ OptionsCustomize.ColumnFiltering = False
+ OptionsSelection.MultiSelect = True
+ OptionsSelection.CheckBoxVisibility = [cbvDataRow, cbvColumnHeader]
+ OptionsView.GroupByBox = False
+ object v2Column6: TcxGridDBColumn
+ Caption = #29983#20135#35746#21333#21495
+ DataBinding.FieldName = 'IONo'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 127
+ end
+ object v2Column15: TcxGridDBColumn
+ Caption = #31859#25968
+ DataBinding.FieldName = 'Meter'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 118
+ end
+ object v2Column3: TcxGridDBColumn
+ Caption = #21305#25968
+ DataBinding.FieldName = 'Piece'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 111
+ end
+ object v2Column1: TcxGridDBColumn
+ Caption = #25104#21697#22791#27880
+ DataBinding.FieldName = 'IONote'
+ DataBinding.IsNullValueType = True
+ PropertiesClassName = 'TcxTextEditProperties'
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 163
+ end
+ end
+ object cxGridLevel1: TcxGridLevel
+ GridView = Tv1
+ end
+ end
+ inherited ADOQueryBaseCmd: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ Left = 121
+ Top = 160
+ end
+ inherited ADOQueryBaseTemp: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ Left = 249
+ Top = 161
+ end
+ inherited ImageList_new32: TImageList
+ Left = 528
+ Top = 144
+ end
+ object ADOQueryTemp: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ LockType = ltReadOnly
+ Parameters = <>
+ Left = 853
+ Top = 193
+ end
+ object ADOQueryCmd: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ Parameters = <>
+ Left = 941
+ Top = 201
+ end
+ object ADOQueryMain: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ Parameters = <>
+ Left = 741
+ Top = 201
+ end
+ object GPM_1: TcxGridPopupMenu
+ Grid = cxGrid1
+ PopupMenus = <>
+ Left = 648
+ Top = 328
+ end
+ object DS_1: TDataSource
+ DataSet = CDS_1
+ Left = 795
+ Top = 323
+ end
+ object CDS_1: TClientDataSet
+ Aggregates = <>
+ Params = <>
+ Left = 720
+ Top = 328
+ end
+ object cxStyleRepository1: TcxStyleRepository
+ Left = 600
+ Top = 200
+ PixelsPerInch = 96
+ object cxStyle1: TcxStyle
+ AssignedValues = [svTextColor]
+ TextColor = clRed
+ end
+ end
+ object OpenDialog1: TOpenDialog
+ Left = 226
+ Top = 290
+ end
+ object CDS_LM: TClientDataSet
+ Aggregates = <>
+ Params = <>
+ Left = 560
+ Top = 328
+ end
+end
diff --git a/F06染色��仓库/U_DyeCPImport.pas b/F06染色��仓库/U_DyeCPImport.pas
new file mode 100644
index 0000000..17159bc
--- /dev/null
+++ b/F06染色��仓库/U_DyeCPImport.pas
@@ -0,0 +1,335 @@
+unit U_DyeCPImport;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
+ cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
+ cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
+ cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
+ cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
+ cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
+ RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
+ IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
+ cxTextEdit, cxDropDownEdit, cxPC, U_BaseHelp, cxLookAndFeels,
+ cxLookAndFeelPainters, cxNavigator, dxDateRanges, dxBarBuiltInMenu, ComObj,
+ U_BaseList, System.ImageList, Vcl.ImgList, dxScrollbarAnnotations,
+ dxSkinsDefaultPainters, dxSkinsCore;
+
+type
+ TfrmDyeCPImport = class(TfrmBaseHelp)
+ ToolBar1: TToolBar;
+ TBRafresh: TToolButton;
+ TBClose: TToolButton;
+ ADOQueryTemp: TADOQuery;
+ ADOQueryCmd: TADOQuery;
+ ADOQueryMain: TADOQuery;
+ GPM_1: TcxGridPopupMenu;
+ DS_1: TDataSource;
+ CDS_1: TClientDataSet;
+ cxStyleRepository1: TcxStyleRepository;
+ cxStyle1: TcxStyle;
+ OpenDialog1: TOpenDialog;
+ TbSelFile: TToolButton;
+ ToolButton1: TToolButton;
+ ToolButton2: TToolButton;
+ CDS_LM: TClientDataSet;
+ ToolButton3: TToolButton;
+ cxGrid1: TcxGrid;
+ Tv1: TcxGridDBTableView;
+ v2Column6: TcxGridDBColumn;
+ v2Column15: TcxGridDBColumn;
+ v2Column3: TcxGridDBColumn;
+ v2Column1: TcxGridDBColumn;
+ cxGridLevel1: TcxGridLevel;
+ procedure FormDestroy(Sender: TObject);
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ procedure TBCloseClick(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure TBRafreshClick(Sender: TObject);
+ procedure TbSelFileClick(Sender: TObject);
+ procedure ToolButton1Click(Sender: TObject);
+ procedure ToolButton2Click(Sender: TObject);
+ procedure ToolButton3Click(Sender: TObject);
+ procedure Tv1ioTypePropertiesEditValueChanged(Sender: TObject);
+ procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
+ private
+ { Private declarations }
+ procedure InitGrid();
+ public
+ { Public declarations }
+ FCTID: string;
+ end;
+
+var
+ frmDyeCPImport: TfrmDyeCPImport;
+
+implementation
+
+uses
+ U_DataLink, U_RTFun, U_DyeClothInPut;
+
+{$R *.dfm}
+
+procedure TfrmDyeCPImport.InitGrid();
+begin
+ try
+ ADOQueryMain.DisableControls;
+ with ADOQueryMain do
+ begin
+ Close;
+ SQL.Clear;
+ sql.Add(' select * from Dye_Cloth_IO where 2= 1 ');
+ Open;
+ end;
+ SCreateCDS(ADOQueryMain, CDS_1);
+ SInitCDSData(ADOQueryMain, CDS_1);
+ finally
+ ADOQueryMain.EnableControls;
+ end;
+end;
+
+procedure TfrmDyeCPImport.FormDestroy(Sender: TObject);
+begin
+ inherited;
+ frmDyeCPImport := nil;
+end;
+
+procedure TfrmDyeCPImport.FormKeyDown(Sender: TObject; var Key: Word;
+ Shift: TShiftState);
+begin
+ if Key = VK_ESCAPE then // VK_ESCAPE ÊÇ ESC ¼üµÄ³£Á¿
+ begin
+ Key := 0; // Çå³ý°´¼ü£¬·ÀÖ¹¼ÌÐø´«µÝ
+ Close; // »òÕß ModalResult := mrCancel;
+ end;
+end;
+
+procedure TfrmDyeCPImport.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+ inherited;
+ Action := cafree;
+
+end;
+
+procedure TfrmDyeCPImport.TBCloseClick(Sender: TObject);
+begin
+
+ Close;
+end;
+
+procedure TfrmDyeCPImport.FormShow(Sender: TObject);
+begin
+ inherited;
+ ReadCxGrid(self.Caption, Tv1, 'Dye_Cloth_IO');
+ with CDS_LM do
+ begin
+ FieldDefs.Clear;
+ FieldDefs.Add('LXH', ftInteger, 0);
+ FieldDefs.Add('lCode', ftString, 40);
+ FieldDefs.Add('LName', ftString, 40);
+ close;
+ CreateDataSet;
+ end;
+ InitGrid();
+ KeyPreview := True; // È·±£±íµ¥¿ÉÒÔÔ¤ÀÀ°´¼ü
+end;
+
+procedure TfrmDyeCPImport.TBRafreshClick(Sender: TObject);
+begin
+ InitGrid();
+end;
+
+procedure TfrmDyeCPImport.ToolButton1Click(Sender: TObject);
+begin
+ WriteCxGrid(self.Caption, Tv1, 'ÑùÆ·¹ÜÀí');
+end;
+
+procedure TfrmDyeCPImport.ToolButton2Click(Sender: TObject);
+begin
+ try
+ ADOQueryCmd.Connection.BeginTrans;
+ CDS_1.DisableControls;
+ with CDS_1 do
+ begin
+ First;
+ while not eof do
+ begin
+
+ with frmDyeClothInPut.CDS_Sub do
+ begin
+
+ Append;
+ FieldByName('IONo').Value := Trim(CDS_1.fieldbyname('IONo').AsString);
+ FieldByName('Meter').Value := Trim(CDS_1.fieldbyname('Meter').AsString);
+ FieldByName('Piece').Value := Trim(CDS_1.fieldbyname('Piece').AsString);
+ FieldByName('IONote').Value := Trim(CDS_1.fieldbyname('IONote').AsString);
+ FieldByName('IOTime').Value := SGetServerDateTime(ADOQueryCmd);
+// if (Trim(CDS_1.fieldbyname('iotype').AsString) = '') or (Trim(CDS_1.fieldbyname('iotype').AsString) = null) then
+// begin
+// FieldByName('iotype').Value := '¼Ó¹¤Èë¿â';
+// end
+// else
+// begin
+// FieldByName('iotype').Value := Trim(CDS_1.fieldbyname('iotype').AsString);
+// end;
+ Post;
+ end;
+
+// with ADOQueryCmd do
+// begin
+// Close;
+// sql.Clear;
+// sql.Add('select A.* from Dye_Plan_Main A ');
+// sql.add(' where MainId = ' + quotedStr(Trim(CDS_1.fieldbyname('IONo').AsString)));
+// open;
+// end;
+//
+// with ADOQueryTemp do
+// begin
+// Close;
+// SQL.Clear;
+// SQL.Add('select * from BS_Cloth_Info where C_Name = ' + QuotedStr(Trim(ADOQueryCmd.fieldbyname('C_Name').asstring)));
+// Open;
+// end;
+//
+// frmDyeClothInPut.CDS_Sub.edit;
+// frmDyeClothInPut.CDS_Sub.FieldByName('IONo').Value := ADOQueryCmd.fieldbyname('IONo').asstring;
+// frmDyeClothInPut.CDS_Sub.FieldByName('Meter').Value := ADOQueryCmd.fieldbyname('Meter').asstring;
+// frmDyeClothInPut.CDS_Sub.FieldByName('Piece').Value := ADOQueryCmd.fieldbyname('Piece').asstring;
+// frmDyeClothInPut.CDS_Sub.FieldByName('IONote').Value := ADOQueryCmd.fieldbyname('IONote').asstring;
+//
+// frmDyeClothInPut.CDS_Sub.FieldByName('finishDescription').Value := ADOQueryCmd.fieldbyname('C_description').asstring;
+//
+//
+// frmDyeClothInPut.CDS_Sub.FieldByName('C_Width').Value := ADOQueryTemp.fieldbyname('C_Width').asstring;
+// frmDyeClothInPut.CDS_Sub.FieldByName('F_Width').Value := ADOQueryTemp.fieldbyname('F_Width').asstring;
+// frmDyeClothInPut.CDS_Sub.FieldByName('Material').Value := ADOQueryTemp.fieldbyname('Material').asstring;
+//
+// frmDyeClothInPut.CDS_Sub.Post;
+ Next;
+ end;
+ end;
+ Application.MessageBox('µ¼Èë³É¹¦£¡', 'ÌáʾÐÅÏ¢', MB_OK);
+ ADOQueryCmd.Connection.CommitTrans;
+ CDS_1.EnableControls;
+ close;
+ except
+ CDS_1.EnableControls;
+ ADOQueryCmd.Connection.RollbackTrans;
+
+ end;
+end;
+
+procedure TfrmDyeCPImport.ToolButton3Click(Sender: TObject);
+begin
+ CDS_1.Delete;
+end;
+
+procedure TfrmDyeCPImport.Tv1ioTypePropertiesEditValueChanged(Sender: TObject);
+var
+ mvalue: string;
+begin
+ mvalue := TcxTextEdit(Sender).EditingText;
+ CDS_1.First;
+
+ while not CDS_1.Eof do
+ begin
+ CDS_1.Edit;
+ CDS_1.FieldByName('ioType').Value := mvalue;
+ CDS_1.Post;
+ CDS_1.Next;
+ end;
+
+end;
+
+procedure TfrmDyeCPImport.TbSelFileClick(Sender: TObject);
+var
+ excelApp, WorkBook: Variant;
+ i, j, k, LX, ExcelRowCount: integer;
+ maxId, FCPID, FCPName, t1, t2, t3, FFID: string;
+begin
+
+ try
+ excelApp := CreateOleObject('Excel.Application');
+ openDialog1.Filter := '*.CSV;*.xls';
+ if opendialog1.Execute then
+ begin
+ WorkBook := excelApp.WorkBooks.Open(OpenDialog1.FileName);
+ end
+ else
+ exit;
+ excelApp.Visible := false;
+ ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
+ except
+ application.MessageBox('¼ÓÔØEXCEL´íÎó£¡', '´íÎóÐÅÏ¢', MB_ICONERROR);
+ exit;
+ end;
+
+ CDS_LM.EmptyDataSet;
+
+ for j := 0 to Tv1.ColumnCount - 1 do
+ begin
+ with CDS_LM do
+ begin
+ Append;
+ FieldByName('LCode').Value := trim(Tv1.Columns[j].DataBinding.FieldName);
+ FieldByName('LName').Value := trim(Tv1.Columns[j].Caption);
+ Post;
+ end;
+ end;
+
+ try
+ for i := 1 to 50 do
+ begin
+ if trim(WorkBook.WorkSheets[1].Cells[1, i].value) = '' then
+ continue;
+ if CDS_LM.Locate('LName', trim(WorkBook.WorkSheets[1].Cells[1, i].value), []) then
+ begin
+ with CDS_LM do
+ begin
+ Edit;
+ FieldByName('LXH').Value := i;
+ Post;
+ end;
+ end;
+ end;
+ except
+ application.MessageBox('¼ÓÔØÊý×é´íÎó£¡', '´íÎóÐÅÏ¢', MB_ICONERROR);
+ exit;
+ end;
+
+ try
+ for i := 2 to ExcelRowCount do
+ begin
+ with CDS_1 do
+ begin
+ Append;
+ CDS_LM.First;
+ while not CDS_LM.Eof do
+ begin
+ if CDS_LM.FieldByName('LXH').AsInteger > 0 then
+ CDS_1.fieldbyname(CDS_LM.FieldByName('LCode').AsString).Value := WorkBook.WorkSheets[1].Cells[i, CDS_LM.FieldByName('LXH').AsInteger].Value;
+ CDS_LM.Next;
+ end;
+ Post;
+ end;
+ end;
+ WorkBook.Close;
+ excelApp.Quit;
+ excelApp := Unassigned;
+ WorkBook := Unassigned;
+ except
+ WorkBook.Close;
+ excelApp.Quit;
+ excelApp := Unassigned;
+ WorkBook := Unassigned;
+ application.MessageBox('дÈëÊý¾ÝÒì³££¬µ¼ÈëÖжϣ¡', '´íÎóÐÅÏ¢', MB_ICONERROR);
+ exit;
+ end;
+
+end;
+
+end.
+
diff --git a/F06染色��仓库/U_DyeClothInList.dfm b/F06染色��仓库/U_DyeClothInList.dfm
index 2c0fc31..fde719e 100644
--- a/F06染色��仓库/U_DyeClothInList.dfm
+++ b/F06染色��仓库/U_DyeClothInList.dfm
@@ -42,16 +42,32 @@ inherited frmDyeClothInList: TfrmDyeClothInList
ImageIndex = 1
OnClick = TBRafreshClick
end
- object TBRKCX: TToolButton
+ object ToolButton3: TToolButton
Left = 71
Top = 0
AutoSize = True
- Caption = #25764#38144#20837#24211
- ImageIndex = 11
+ Caption = #20837#24211
+ ImageIndex = 2
+ OnClick = ToolButton3Click
+ end
+ object ToolButton5: TToolButton
+ Left = 142
+ Top = 0
+ AutoSize = True
+ Caption = #20462#25913
+ ImageIndex = 3
+ OnClick = ToolButton5Click
+ end
+ object TBRKCX: TToolButton
+ Left = 213
+ Top = 0
+ AutoSize = True
+ Caption = #21024#38500
+ ImageIndex = 14
OnClick = TBRKCXClick
end
object ToolButton1: TToolButton
- Left = 166
+ Left = 284
Top = 0
AutoSize = True
Caption = #25353#21333#25171#21360
@@ -59,7 +75,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
OnClick = ToolButton1Click
end
object ToolButton2: TToolButton
- Left = 261
+ Left = 379
Top = 0
AutoSize = True
Caption = #21246#36873#25171#21360
@@ -68,7 +84,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
OnClick = ToolButton2Click
end
object TBExport: TToolButton
- Left = 356
+ Left = 474
Top = 0
AutoSize = True
Caption = #23548#20986
@@ -76,7 +92,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
OnClick = TBExportClick
end
object ToolButton4: TToolButton
- Left = 427
+ Left = 545
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
@@ -84,7 +100,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
OnClick = ToolButton4Click
end
object TBClose: TToolButton
- Left = 522
+ Left = 640
Top = 0
AutoSize = True
Caption = #20851#38381
@@ -111,12 +127,12 @@ inherited frmDyeClothInList: TfrmDyeClothInList
Caption = #33267
end
object Label3: TLabel
- Left = 195
+ Left = 200
Top = 10
- Width = 52
+ Width = 65
Height = 12
Hint = '0'
- Caption = #35745#21010#21333#21495
+ Caption = #29983#20135#35746#21333#21495
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
@@ -125,12 +141,12 @@ inherited frmDyeClothInList: TfrmDyeClothInList
ParentFont = False
end
object Label7: TLabel
- Left = 365
+ Left = 598
Top = 10
Width = 26
Height = 12
Hint = '0'
- Caption = #39068#33394
+ Caption = #26448#36136
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
@@ -139,12 +155,12 @@ inherited frmDyeClothInList: TfrmDyeClothInList
ParentFont = False
end
object Label10: TLabel
- Left = 511
+ Left = 403
Top = 36
- Width = 39
+ Width = 52
Height = 12
Hint = '1'
- Caption = #21367#26465#30721
+ Caption = #25104#21697#22791#27880
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
@@ -153,12 +169,12 @@ inherited frmDyeClothInList: TfrmDyeClothInList
ParentFont = False
end
object Label5: TLabel
- Left = 195
+ Left = 200
Top = 36
Width = 52
Height = 12
Hint = '0'
- Caption = #20135#21697#21517#31216
+ Caption = #25104#21697#21517#31216
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
@@ -167,26 +183,12 @@ inherited frmDyeClothInList: TfrmDyeClothInList
ParentFont = False
end
object lbl1: TLabel
- Left = 524
+ Left = 403
Top = 10
- Width = 26
+ Width = 52
Height = 12
Hint = '0'
- Caption = #21345#21495
- Font.Charset = GB2312_CHARSET
- Font.Color = clWindowText
- Font.Height = -12
- Font.Name = #23435#20307
- Font.Style = [fsBold]
- ParentFont = False
- end
- object Label20: TLabel
- Left = 365
- Top = 36
- Width = 26
- Height = 12
- Hint = '0'
- Caption = #33457#22411
+ Caption = #22383#24067#22791#27880
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
@@ -252,7 +254,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
end
object OrderNo: TEdit
Tag = 2
- Left = 248
+ Left = 265
Top = 6
Width = 100
Height = 20
@@ -260,9 +262,9 @@ inherited frmDyeClothInList: TfrmDyeClothInList
TabOrder = 5
OnKeyPress = orderNoKeyPress
end
- object STKID: TEdit
+ object IONote: TEdit
Tag = 2
- Left = 556
+ Left = 458
Top = 32
Width = 100
Height = 20
@@ -272,7 +274,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
end
object C_Name: TEdit
Tag = 2
- Left = 248
+ Left = 265
Top = 32
Width = 100
Height = 20
@@ -280,9 +282,9 @@ inherited frmDyeClothInList: TfrmDyeClothInList
TabOrder = 7
OnKeyPress = CustNameKeyPress
end
- object C_Color: TEdit
+ object Material: TEdit
Tag = 2
- Left = 393
+ Left = 630
Top = 6
Width = 100
Height = 20
@@ -290,9 +292,9 @@ inherited frmDyeClothInList: TfrmDyeClothInList
TabOrder = 8
OnKeyPress = CustNameKeyPress
end
- object PCId: TEdit
+ object PB_note: TEdit
Tag = 2
- Left = 556
+ Left = 458
Top = 6
Width = 100
Height = 20
@@ -300,16 +302,6 @@ inherited frmDyeClothInList: TfrmDyeClothInList
TabOrder = 9
OnKeyPress = CustNameKeyPress
end
- object C_Pattern: TEdit
- Tag = 2
- Left = 393
- Top = 32
- Width = 100
- Height = 20
- Hint = '0'
- TabOrder = 10
- OnKeyPress = CustNameKeyPress
- end
end
object Panel6: TPanel [2]
Left = 0
@@ -428,6 +420,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
ParentFont = False
PopupMenu = PM_1
TabOrder = 3
+ ExplicitTop = 131
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@@ -444,11 +437,9 @@ inherited frmDyeClothInList: TfrmDyeClothInList
end
item
Kind = skCount
- Column = v1Column6
end
item
Kind = skSum
- Column = v1Column10
end
item
Kind = skSum
@@ -475,7 +466,6 @@ inherited frmDyeClothInList: TfrmDyeClothInList
end
item
Kind = skCount
- Column = v1Column23
end
item
Kind = skSum
@@ -507,141 +497,102 @@ inherited frmDyeClothInList: TfrmDyeClothInList
Options.Sorting = False
Width = 66
end
- object v1Column21: TcxGridDBColumn
- Caption = #20837#24211#21333#21495
- DataBinding.FieldName = 'IOID'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 103
- end
- object Tv1Column9: TcxGridDBColumn
- Caption = #20837#24211#26102#38388
- DataBinding.FieldName = 'IOTime'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 71
- end
- object Tv1Column11: TcxGridDBColumn
- Caption = #20837#24211#31867#22411
- DataBinding.FieldName = 'IOType'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 71
- end
object v1Column1: TcxGridDBColumn
- Caption = #35745#21010#21333#21495
- DataBinding.FieldName = 'OrderNo'
+ Caption = #29983#20135#35746#21333#21495
+ DataBinding.FieldName = 'IONO'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 78
end
object v1Column13: TcxGridDBColumn
- Caption = #20135#21697#21517#31216
+ Caption = #25104#21697#21517#31216
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
- Width = 66
+ Width = 90
end
- object v1Column4: TcxGridDBColumn
- Caption = #39068#33394
- DataBinding.FieldName = 'C_Color'
+ object Tv1Column11: TcxGridDBColumn
+ Caption = #25104#21697#20837#24211#31867#22411
+ DataBinding.FieldName = 'IOType'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
- Width = 66
+ Width = 110
end
- object v1Column18: TcxGridDBColumn
- Caption = #21345#21495
- DataBinding.FieldName = 'PCId'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 67
- end
- object v1Column23: TcxGridDBColumn
- Caption = #21367#21495
- DataBinding.FieldName = 'PieceNo'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object v1Column10: TcxGridDBColumn
- Caption = #31859#25968
- DataBinding.FieldName = 'Meter'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object Tv1Column12: TcxGridDBColumn
- Caption = #24211#20301
- DataBinding.FieldName = 'IOPosition'
+ object Tv1Column9: TcxGridDBColumn
+ Caption = #20837#24211#26102#38388
+ DataBinding.FieldName = 'ioTime'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 71
end
- object v1Column12: TcxGridDBColumn
- Caption = #21697#36136
- DataBinding.FieldName = 'Grade'
+ object Tv1IONote: TcxGridDBColumn
+ Caption = #25104#21697#22791#27880
+ DataBinding.FieldName = 'IONote'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
+ Width = 80
end
- object v1Column42: TcxGridDBColumn
- Caption = #24635#35760#24405#25968
- DataBinding.FieldName = 'TotalCount'
+ object Tv1Meter: TcxGridDBColumn
+ Caption = #25104#21697#31859#25968
+ DataBinding.FieldName = 'Meter'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
+ Width = 103
end
- object v1Column6: TcxGridDBColumn
- Caption = #21367#26465#30721
- DataBinding.FieldName = 'CIID'
+ object Tv1Piece: TcxGridDBColumn
+ Caption = #25104#21697#21305#25968
+ DataBinding.FieldName = 'Piece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
+ Width = 96
end
- object v1Column3: TcxGridDBColumn
- Caption = #38376#24133
- DataBinding.FieldName = 'C_Width'
+ object Tv1Material: TcxGridDBColumn
+ Caption = #26448#36136
+ DataBinding.FieldName = 'Material'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object v1Column5: TcxGridDBColumn
- Caption = #20811#37325
- DataBinding.FieldName = 'C_GramWeight'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object Tv1Column3: TcxGridDBColumn
- Caption = #33394#21495
- DataBinding.FieldName = 'C_ColorNo'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
+ Width = 80
end
object Tv1finishDescription: TcxGridDBColumn
- Caption = #21518#25972#29702#25551#36848
+ Caption = #25104#21697#21518#25972#29702#25551#36848
DataBinding.FieldName = 'finishDescription'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 132
end
+ object Tv1PB_ioType: TcxGridDBColumn
+ Caption = #22383#24067#20837#24211#31867#22411
+ DataBinding.FieldName = 'PB_ioType'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 116
+ end
+ object Tv1PB_note: TcxGridDBColumn
+ Caption = #22383#24067#22791#27880
+ DataBinding.FieldName = 'PB_note'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 80
+ end
+ object Tv1PB_Qty: TcxGridDBColumn
+ Caption = #22383#24067#31859#25968
+ DataBinding.FieldName = 'PB_Qty'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 80
+ end
+ object Tv1PB_piece: TcxGridDBColumn
+ AlternateCaption = '80'
+ Caption = #22383#24067#21305#25968
+ DataBinding.FieldName = 'PB_piece'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 80
+ end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
diff --git a/F06染色��仓库/U_DyeClothInList.pas b/F06染色��仓库/U_DyeClothInList.pas
index 96921af..724aba0 100644
--- a/F06染色��仓库/U_DyeClothInList.pas
+++ b/F06染色��仓库/U_DyeClothInList.pas
@@ -46,41 +46,37 @@ type
cxGrid1: TcxGrid;
Tv1: TcxGridDBTableView;
v1Column22: TcxGridDBColumn;
- v1Column21: TcxGridDBColumn;
v1Column1: TcxGridDBColumn;
v1Column13: TcxGridDBColumn;
- v1Column4: TcxGridDBColumn;
- v1Column18: TcxGridDBColumn;
- v1Column23: TcxGridDBColumn;
- v1Column10: TcxGridDBColumn;
- v1Column12: TcxGridDBColumn;
- v1Column42: TcxGridDBColumn;
- v1Column6: TcxGridDBColumn;
- v1Column3: TcxGridDBColumn;
- v1Column5: TcxGridDBColumn;
- Tv1Column3: TcxGridDBColumn;
cxGrid1Level1: TcxGridLevel;
Label3: TLabel;
Label7: TLabel;
Label10: TLabel;
Label5: TLabel;
lbl1: TLabel;
- Label20: TLabel;
OrderNo: TEdit;
- STKID: TEdit;
+ IONote: TEdit;
C_Name: TEdit;
- C_Color: TEdit;
- PCId: TEdit;
- C_Pattern: TEdit;
+ Material: TEdit;
+ PB_note: TEdit;
Tv1Column9: TcxGridDBColumn;
Tv1Column11: TcxGridDBColumn;
- Tv1Column12: TcxGridDBColumn;
PM_1: TPopupMenu;
PM11: TMenuItem;
ToolButton1: TToolButton;
N1: TMenuItem;
N2: TMenuItem;
Tv1finishDescription: TcxGridDBColumn;
+ ToolButton3: TToolButton;
+ Tv1Material: TcxGridDBColumn;
+ Tv1PB_ioType: TcxGridDBColumn;
+ Tv1PB_note: TcxGridDBColumn;
+ Tv1PB_Qty: TcxGridDBColumn;
+ Tv1PB_piece: TcxGridDBColumn;
+ Tv1IONote: TcxGridDBColumn;
+ Tv1Meter: TcxGridDBColumn;
+ Tv1Piece: TcxGridDBColumn;
+ ToolButton5: TToolButton;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
@@ -107,6 +103,8 @@ type
procedure N2Click(Sender: TObject);
procedure CustNameKeyPress(Sender: TObject; var Key: Char);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
+ procedure ToolButton3Click(Sender: TObject);
+ procedure ToolButton5Click(Sender: TObject);
private
CurrentPage, RecordsNumber: Integer;
lstCust: TStringList;
@@ -121,7 +119,7 @@ type
implementation
uses
- U_DataLink, U_RTFun, U_LabelPrint;
+ U_DataLink, U_RTFun, U_LabelPrint, U_DyeClothInPut;
{$R *.dfm}
@@ -149,8 +147,7 @@ begin
FWorkshop := trim(Self.fParameters3);
end;
-procedure TfrmDyeClothInList.FormKeyDown(Sender: TObject; var Key: Word;
- Shift: TShiftState);
+procedure TfrmDyeClothInList.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if Key = VK_ESCAPE then // VK_ESCAPE ÊÇ ESC ¼üµÄ³£Á¿
begin
@@ -185,16 +182,15 @@ begin
sql.Add(' from ');
sql.Add('(select rownumber=cast((row_number() over(order by A.IOTime desc)) as int)');
sql.Add(',COUNT(1) OVER() AS TotalCount');
- sql.Add(',* from V_Dye_Cloth_IO A where A.IOFlag = ''Èë¿â'' ');
- if trim(FWorkshop) <> '' then
- sql.Add(' and Workshop=''' + trim(FWorkshop) + ''' ');
+ sql.Add(',* from V_Dye_Cloth_IO_cai A where A.IOFlag = ''Èë¿â'' ');
+// if trim(FWorkshop) <> '' then
+// sql.Add(' and Workshop=''' + trim(FWorkshop) + ''' ');
sql.Add('and 1=1 ' + WSql);
sql.Add(') temp_row');
sql.Add(' where rownumber> ' + inttostr(((CurrentPage - 1) * RecordsNumber)));
sql.Add(' order by rownumber');
-
-// showmessage(sql.text);
+// showmessage(sql.text);
Open;
end;
SCreateCDS(ADOQueryMain, CDS_1);
@@ -287,118 +283,303 @@ begin
end;
procedure TfrmDyeClothInList.TBRKCXClick(Sender: TObject);
-var
- MCIIDS, MIOIDS, MSTKIDS, MPCIDS: string;
begin
- if CDS_1.IsEmpty then
- Exit;
- if not CDS_1.Locate('SSel', True, []) then
+
+ if CDS_1.Locate('ssel', True, []) = False then
begin
Application.MessageBox('ûÓÐÑ¡ÔñÊý¾Ý!', 'Ìáʾ', 0);
Exit;
end;
- MCIIDS := '';
- MIOIDS := '';
- MSTKIDS := '';
- MPCIDS := '';
- CDS_1.DisableControls;
- with CDS_1 do
- begin
- First;
- while not Eof do
- begin
- if CDS_1.fieldbyname('SSel').AsBoolean then
- begin
- MCIIDS := MCIIDS + (Trim(CDS_1.fieldbyname('StkID').AsString)) + ',';
- MIOIDS := MIOIDS + (Trim(CDS_1.fieldbyname('IOID').AsString)) + ',';
- MSTKIDS := MSTKIDS + (Trim(CDS_1.fieldbyname('STKID').AsString)) + ',';
- MPCIDS := MPCIDS + (Trim(CDS_1.fieldbyname('PCID').AsString)) + ',';
- end;
- Next;
- end;
- end;
- MCIIDS := leftBstr(trim(MCIIDS), length(MCIIDS) - 1);
- MIOIDS := leftBstr(trim(MIOIDS), length(MIOIDS) - 1);
- MSTKIDS := leftBstr(trim(MSTKIDS), length(MSTKIDS) - 1);
-
- CDS_1.Locate('SSel', True, []);
- CDS_1.EnableControls;
-
- if Application.MessageBox('È·¶¨ÒªÖ´ÐвÙ×÷Âð£¿', 'Ìáʾ', 32 + 4) <> IDYES then
+ if Application.MessageBox('È·¶¨ÒªÉ¾³ýÊý¾ÝÂð£¿', 'Ìáʾ', 32 + 4) <> IDYES then
Exit;
try
ADOQueryCmd.Connection.BeginTrans;
-
- with ADOQueryCmd do
+ CDS_1.DisableControls;
+ with CDS_1 do
begin
- Close;
- sql.Clear;
- sql.Add('insert into Dye_Need_Up(UType,UDataId,UOperation,UOperator,UModule,UDetails) ');
- sql.Add('values(''Ⱦɫ³ÉÆ·Èë¿â'' ');
- sql.Add(',' + quotedstr(MPCIDS));
- sql.Add(',''³·ÏúÈë¿â'' ');
- sql.Add(',' + quotedstr(DName));
- sql.Add(',' + quotedstr(trim(self.Caption)));
- sql.Add(',' + quotedstr(MSTKIDS));
- sql.Add(') ');
- execsql;
- end;
+ First;
+ while not eof do
+ begin
+ if CDS_1.FieldByName('ssel').AsBoolean then
+ begin
- with ADOQueryCmd do
- begin
- Close;
- Sql.Clear;
- Sql.Add('exec P_Dye_Cloth_ReIn_cai ');
- Sql.Add('@StkIds=' + quotedstr(trim(MSTKIDS)));
- Sql.Add(',@IOIDS=' + quotedstr(trim(MIOIDS)));
- Sql.Add(',@FillId=' + quotedstr(trim(dcode)));
- Sql.Add(',@Filler=' + quotedstr(trim(dname)));
-// ShowMessage(sql.Text);
- Open;
- end;
+ with ADOQueryCmd do
+ begin
+ Close;
+ sql.Clear;
+ sql.add('insert into Dye_Cloth_IO_Del select * from Dye_Cloth_IO where IOID=''' + trim(CDS_1.fieldbyname('IOID').AsString) + ''' ');
+ sql.Add('update Dye_Cloth_IO_Del Set DelTime=Getdate(),Deler=''' + trim(DName) + ''' where IOID=''' + trim(CDS_1.fieldbyname('IOID').AsString) + ''' ');
+ sql.Add(' delete from Dye_Cloth_IO ');
+ sql.Add('where IOID =''' + Trim(CDS_1.FieldByName('IOID').asString) + ''' ');
+ ExecSQL;
+ end;
- if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
- begin
- raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
- end;
- with ADOQueryCmd do
- begin
- Close;
- Sql.Clear;
- Sql.Add(' update Dye_Cloth_Stock set StkExists =0 where StkMeter =0 and StkPiece =0 ');
- ExecSQL;
- end;
+ /////////////////////ÕûÀí¿â´æ////////////////
+ with ADOQueryCmd do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('Update Dye_Cloth_Stock Set StkPiece=(select Sum(isnull(Piece,0)*IOQtyFlag) from Dye_Cloth_IO A where A.StkID =''' + Trim(CDS_1.FieldByName('StkId').asString) + ''')');
+ sql.Add(',STKMeter=(select Sum(isnull(Meter,0)*IOQtyFlag) from Dye_Cloth_IO A where A.StkID =''' + Trim(CDS_1.FieldByName('StkId').asString) + ''')');
+ sql.Add('where StkID =''' + Trim(CDS_1.FieldByName('StkId').asString) + ''' ');
+ ExecSQL;
+ end;
+ with ADOQueryCmd do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('select * from Dye_Cloth_Stock where StkID=''' + Trim(CDS_1.fieldbyname('StkID').AsString) + '''');
+ Open;
+ 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(MSTKIDS)));
- sql.Add(',' + quotedstr(trim('³É¹¦')));
- sql.Add(')');
- ExecSQL;
+ if (ADOQueryCmd.FieldByName('StkPiece').AsString = '0') and (ADOQueryCmd.FieldByName('StkMeter').AsString = '0') then
+ begin
+ ADOQueryCmd.Edit;
+ ADOQueryCmd.FieldByName('StkExists').Value := 0;
+ ADOQueryCmd.Post;
+ end
+ else
+ begin
+ ADOQueryCmd.Edit;
+ ADOQueryCmd.FieldByName('StkExists').Value := 1;
+ ADOQueryCmd.Post;
+ end;
+
+ with ADOQueryTemp do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('select * from Dye_Cloth_Stock where StkID=''' + Trim(CDS_1.fieldbyname('StkID').AsString) + '''');
+ Open;
+ end;
+
+ if ADOQueryTemp.FieldByName('StkMeter').Value < 0 then
+ raise Exception.Create('³ö¿âÊýÁ¿´óÓÚÈë¿âÊýÁ¿²»Äܱ£´æ£¡');
+
+ if ADOQueryTemp.FieldByName('StkPiece').Value < 0 then
+ raise Exception.Create('³ö¿âÆ¥Êý´óÓÚÈë¿âÆ¥Êý²»Äܱ£´æ£¡');
+ end;
+ Next;
+ end;
end;
+ CDS_1.EnableControls;
ADOQueryCmd.Connection.CommitTrans;
+ except
+ CDS_1.EnableControls;
+ ADOQueryCmd.Connection.RollbackTrans;
+ application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
+ end;
+
+end;
+
+//var °ë³ÉƷдÁËÒ»°ë
+// IOIDS: string;
+//begin
+// if CDS_1.Locate('ssel', True, []) = False then
+// begin
+// Application.MessageBox('ûÓÐÑ¡ÔñÊý¾Ý!', 'Ìáʾ', 0);
+// Exit;
+// end;
+// if Application.MessageBox('È·¶¨ÒªÉ¾³ýÊý¾ÝÂð£¿', 'Ìáʾ', 32 + 4) <> IDYES then
+// Exit;
+// CDS_1.DisableControls;
+// with CDS_1 do
+// begin
+// First;
+// while not Eof do
+// begin
+// if CDS_1.FieldByName('SSel').AsBoolean = True then
+// begin
+//
+// IOIDS := IOIDS + Trim(CDS_1.fieldbyname('IOID').AsString) + ',';
+// CDS_1.Delete;
+// end
+// else
+// Next;
+// end;
+// end;
+// CDS_1.EnableControls;
+// try
+// ADOQueryCmd.Connection.BeginTrans;
// with ADOQueryCmd do
// begin
// Close;
// sql.Clear;
-// sql.Add('exec P_Dye_Card_PSC ');
+// sql.Add('insert into Trade_Need_Up(UOperation,UType,UDataId) values(''¼ìÑéɾ³ý'',''¼ìÑé'',' + quotedstr(IOIDS) + ') ');
+// ExecSQL;
+// end;
+// with ADOQueryCmd do
+// begin
+// Close;
+// Sql.Clear;
+// Sql.Add('exec P_Dye_Cloth_ReIn_cai ');
+// Sql.Add('@CIIDS=' + quotedstr(Trim(IOIDS)));
+// Sql.Add(',@DCode=' + Quotedstr(DCode));
+// Sql.Add(',@DName=' + Quotedstr(DName));
+// Open;
+// end;
+// if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
+// begin
+// raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
+// end;
+// ADOQueryCmd.Connection.CommitTrans;
+// CurrentPage := 1;
+// InitGrid();
+// application.MessageBox('ɾ³ý³É¹¦£¡', 'ÌáʾÐÅÏ¢');
+// except
+// ADOQueryCmd.Connection.RollbackTrans;
+// application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
+// end;
+//
+//end;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//var
+// MCIIDS, MIOIDS, MSTKIDS, MPCIDS: string;
+//begin
+// if CDS_1.IsEmpty then
+// Exit;
+// if not CDS_1.Locate('SSel', True, []) then
+// begin
+// Application.MessageBox('ûÓÐÑ¡ÔñÊý¾Ý!', 'Ìáʾ', 0);
+// Exit;
+// end;
+// MCIIDS := '';
+// MIOIDS := '';
+// MSTKIDS := '';
+// MPCIDS := '';
+// CDS_1.DisableControls;
+// with CDS_1 do
+// begin
+// First;
+// while not Eof do
+// begin
+// if CDS_1.fieldbyname('SSel').AsBoolean then
+// begin
+// MCIIDS := MCIIDS + (Trim(CDS_1.fieldbyname('StkID').AsString)) + ',';
+// MIOIDS := MIOIDS + (Trim(CDS_1.fieldbyname('IOID').AsString)) + ',';
+// MSTKIDS := MSTKIDS + (Trim(CDS_1.fieldbyname('STKID').AsString)) + ',';
+// MPCIDS := MPCIDS + (Trim(CDS_1.fieldbyname('PCID').AsString)) + ',';
+// end;
+// Next;
+// end;
+// end;
+// MCIIDS := leftBstr(trim(MCIIDS), length(MCIIDS) - 1);
+// MIOIDS := leftBstr(trim(MIOIDS), length(MIOIDS) - 1);
+// MSTKIDS := leftBstr(trim(MSTKIDS), length(MSTKIDS) - 1);
+//
+// CDS_1.Locate('SSel', True, []);
+// CDS_1.EnableControls;
+//
+// if Application.MessageBox('È·¶¨ÒªÖ´ÐвÙ×÷Âð£¿', 'Ìáʾ', 32 + 4) <> IDYES then
+// Exit;
+//
+// try
+// ADOQueryCmd.Connection.BeginTrans;
+//
+// with ADOQueryCmd do
+// begin
+// Close;
+// sql.Clear;
+// sql.Add('insert into Dye_Need_Up(UType,UDataId,UOperation,UOperator,UModule,UDetails) ');
+// sql.Add('values(''Ⱦɫ³ÉÆ·Èë¿â'' ');
+// sql.Add(',' + quotedstr(MPCIDS));
+// sql.Add(',''ɾ³ýÈë¿â¼Ç¼'' ');
+// sql.Add(',' + quotedstr(DName));
+// sql.Add(',' + quotedstr(trim(self.Caption)));
+// sql.Add(',' + quotedstr(MSTKIDS));
+// sql.Add(') ');
// execsql;
// end;
- InitGrid();
- except
- ADOQueryCmd.Connection.RollbackTrans;
- application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
- end;
-end;
+//
+// with ADOQueryCmd do
+// begin
+// Close;
+// Sql.Clear;
+// Sql.Add('exec P_Dye_Cloth_ReIn_cai ');
+// Sql.Add('@StkIds=' + quotedstr(trim(MSTKIDS)));
+// Sql.Add(',@IOIDS=' + quotedstr(trim(MIOIDS)));
+// Sql.Add(',@FillId=' + quotedstr(trim(dcode)));
+// Sql.Add(',@Filler=' + quotedstr(trim(dname)));
+//// ShowMessage(sql.Text);
+// Open;
+// end;
+//
+// if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
+// begin
+// raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
+// end;
+//
+// with ADOQueryCmd do
+// begin
+// Close;
+// Sql.Clear;
+// Sql.Add(' update Dye_Cloth_Stock set StkExists =0 where StkMeter =0 and StkPiece =0 ');
+// 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(MSTKIDS)));
+// sql.Add(',' + quotedstr(trim('³É¹¦')));
+// sql.Add(')');
+// ExecSQL;
+// end;
+// ADOQueryCmd.Connection.CommitTrans;
+//// with ADOQueryCmd do
+//// begin
+//// Close;
+//// sql.Clear;
+//// sql.Add('exec P_Dye_Card_PSC ');
+//// execsql;
+//// end;
+// InitGrid();
+// except
+// ADOQueryCmd.Connection.RollbackTrans;
+// application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
+// end;
+//end;
procedure TfrmDyeClothInList.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string);
begin
@@ -537,10 +718,50 @@ begin
end;
end;
+procedure TfrmDyeClothInList.ToolButton3Click(Sender: TObject);
+begin
+ try
+ frmDyeClothInPut := TfrmDyeClothInPut.Create(Application);
+ with frmDyeClothInPut do
+ begin
+
+ FIOID := '';
+
+ FWorkshop := self.FWorkshop;
+ if ShowModal = 1 then
+ begin
+ Self.InitGrid();
+ end;
+ end;
+ finally
+ frmDyeClothInPut.Free;
+ end;
+end;
+
procedure TfrmDyeClothInList.ToolButton4Click(Sender: TObject);
begin
WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, '³ÉÆ·Èë¿âÁбí');
end;
+procedure TfrmDyeClothInList.ToolButton5Click(Sender: TObject);
+begin
+ try
+ frmDyeClothInPut := TfrmDyeClothInPut.Create(Application);
+ with frmDyeClothInPut do
+ begin
+
+ FIOID := CDS_1.FieldByName('IOID').AsString;
+ TBAdd.Visible := False;
+ FWorkshop := self.FWorkshop;
+ if ShowModal = 1 then
+ begin
+ Self.InitGrid();
+ end;
+ end;
+ finally
+ frmDyeClothInPut.Free;
+ end;
+end;
+
end.
diff --git a/F06染色��仓库/U_DyeClothInPut.dfm b/F06染色��仓库/U_DyeClothInPut.dfm
new file mode 100644
index 0000000..a7909cd
--- /dev/null
+++ b/F06染色��仓库/U_DyeClothInPut.dfm
@@ -0,0 +1,288 @@
+inherited frmDyeClothInPut: TfrmDyeClothInPut
+ Left = 65
+ Top = 113
+ Caption = #25104#21697#20837#24211#24405#20837
+ ClientHeight = 546
+ ClientWidth = 1406
+ Color = clWhite
+ Font.Charset = GB2312_CHARSET
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Position = poMainFormCenter
+ OnClose = FormClose
+ OnKeyDown = FormKeyDown
+ ExplicitWidth = 1422
+ ExplicitHeight = 585
+ PixelsPerInch = 96
+ TextHeight = 12
+ object ToolBar1: TToolBar [0]
+ Tag = 1
+ Left = 0
+ Top = 0
+ Width = 1406
+ Height = 38
+ AutoSize = True
+ ButtonHeight = 38
+ ButtonWidth = 91
+ Caption = 'ToolBar1'
+ Color = clSkyBlue
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = []
+ Images = DataLink_DyeClothStk.ImageList_new32
+ List = True
+ ParentColor = False
+ ParentFont = False
+ ShowCaptions = True
+ TabOrder = 0
+ object TBSave: TToolButton
+ Left = 0
+ Top = 0
+ AutoSize = True
+ Caption = #20445#23384
+ ImageIndex = 16
+ OnClick = TBSaveClick
+ end
+ object TBAdd: TToolButton
+ Left = 71
+ Top = 0
+ AutoSize = True
+ Caption = #26032#22686
+ ImageIndex = 2
+ OnClick = TBAddClick
+ end
+ object TBDel: TToolButton
+ Left = 142
+ Top = 0
+ AutoSize = True
+ Caption = #21024#38500
+ ImageIndex = 6
+ OnClick = TBDelClick
+ end
+ object ToolButton2: TToolButton
+ Left = 213
+ Top = 0
+ AutoSize = True
+ Caption = #23548#20837
+ ImageIndex = 17
+ OnClick = ToolButton2Click
+ end
+ object ToolButton1: TToolButton
+ Left = 284
+ Top = 0
+ AutoSize = True
+ Caption = #20445#23384#26684#24335
+ ImageIndex = 16
+ OnClick = ToolButton1Click
+ end
+ object TBClose: TToolButton
+ Left = 379
+ Top = 0
+ AutoSize = True
+ Caption = #20851#38381
+ ImageIndex = 7
+ OnClick = TBCloseClick
+ end
+ end
+ object cxGrid2: TcxGrid [1]
+ Left = 0
+ Top = 38
+ Width = 1406
+ Height = 508
+ Align = alClient
+ TabOrder = 1
+ object Tv1: TcxGridDBTableView
+ Navigator.Buttons.CustomButtons = <>
+ ScrollbarAnnotations.CustomAnnotations = <>
+ DataController.DataSource = DataSource3
+ DataController.Summary.DefaultGroupSummaryItems = <
+ item
+ Kind = skSum
+ Position = spFooter
+ end>
+ DataController.Summary.FooterSummaryItems = <
+ item
+ Kind = skCount
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ Column = v2Column6
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Format = #26465#25968#65306'0'
+ Kind = skCount
+ Column = v1Column6
+ end
+ item
+ Kind = skSum
+ Column = v1Column15
+ end>
+ DataController.Summary.SummaryGroups = <>
+ OptionsCustomize.ColumnFiltering = False
+ OptionsView.Footer = True
+ OptionsView.GroupByBox = False
+ object Tv1IONo: TcxGridDBColumn
+ Tag = 2
+ Caption = #29983#20135#35746#21333#21495
+ DataBinding.FieldName = 'IONo'
+ DataBinding.IsNullValueType = True
+ PropertiesClassName = 'TcxButtonEditProperties'
+ Properties.Buttons = <
+ item
+ Default = True
+ Kind = bkEllipsis
+ end>
+ Properties.OnButtonClick = Tv1IONoPropertiesButtonClick
+ HeaderAlignmentHorz = taCenter
+ Width = 90
+ end
+ object v2Column6: TcxGridDBColumn
+ Tag = 2
+ Caption = #31859#25968
+ DataBinding.FieldName = 'Meter'
+ DataBinding.IsNullValueType = True
+ PropertiesClassName = 'TcxTextEditProperties'
+ HeaderAlignmentHorz = taCenter
+ Width = 85
+ end
+ object v1Column15: TcxGridDBColumn
+ Tag = 2
+ Caption = #21305#25968
+ DataBinding.FieldName = 'Piece'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 106
+ end
+ object Tv1IONote: TcxGridDBColumn
+ Tag = 2
+ Caption = #25104#21697#22791#27880
+ DataBinding.FieldName = 'IONote'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 78
+ end
+ object Tv1IOType: TcxGridDBColumn
+ Tag = 2
+ Caption = #25104#21697#20837#24211#31867#22411
+ DataBinding.FieldName = 'IOType'
+ DataBinding.IsNullValueType = True
+ PropertiesClassName = 'TcxComboBoxProperties'
+ Properties.DropDownListStyle = lsFixedList
+ Properties.Items.Strings = (
+ #22823#36135#25104#21697
+ #22823#36135#22238#20462#25104#21697
+ #26679#24067#25104#21697
+ #26679#24067#22238#20462#25104#21697
+ '')
+ HeaderAlignmentHorz = taCenter
+ Width = 103
+ end
+ object Tv1ioTime: TcxGridDBColumn
+ Tag = 2
+ Caption = #20837#24211#26102#38388
+ DataBinding.FieldName = 'ioTime'
+ DataBinding.IsNullValueType = True
+ PropertiesClassName = 'TcxDateEditProperties'
+ Properties.Kind = ckDateTime
+ Properties.SaveTime = False
+ Properties.ShowTime = False
+ HeaderAlignmentHorz = taCenter
+ Width = 118
+ end
+ object v1Column6: TcxGridDBColumn
+ Tag = 2
+ Caption = #20837#24211#21333#21495
+ DataBinding.FieldName = 'IOID'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 106
+ end
+ object v2Column1: TcxGridDBColumn
+ Tag = 2
+ Caption = #25104#21697#21697#21517
+ DataBinding.FieldName = 'C_Name'
+ DataBinding.IsNullValueType = True
+ PropertiesClassName = 'TcxButtonEditProperties'
+ Properties.Buttons = <
+ item
+ Default = True
+ Kind = bkEllipsis
+ end>
+ Visible = False
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 99
+ end
+ end
+ object cxGrid2Level1: TcxGridLevel
+ GridView = Tv1
+ end
+ end
+ inherited ADOQueryBaseCmd: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ Left = 121
+ Top = 80
+ end
+ inherited ADOQueryBaseTemp: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ end
+ inherited ImageList_new32: TImageList
+ Left = 320
+ Top = 280
+ end
+ object DataSource3: TDataSource
+ DataSet = CDS_Sub
+ Left = 592
+ Top = 144
+ end
+ object CDS_Sub: TClientDataSet
+ Aggregates = <>
+ Params = <>
+ Left = 512
+ Top = 144
+ end
+ object ADOQueryCmd: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ Parameters = <>
+ Left = 232
+ Top = 184
+ end
+ object ADOQueryMain: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ LockType = ltReadOnly
+ Parameters = <>
+ Left = 304
+ Top = 176
+ end
+ object ADOQueryTemp: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ LockType = ltReadOnly
+ Parameters = <>
+ Left = 376
+ Top = 184
+ end
+ object cxGridPopupMenu2: TcxGridPopupMenu
+ Grid = cxGrid2
+ PopupMenus = <>
+ Left = 464
+ Top = 104
+ end
+end
diff --git a/F06染色��仓库/U_DyeClothInPut.pas b/F06染色��仓库/U_DyeClothInPut.pas
new file mode 100644
index 0000000..535d802
--- /dev/null
+++ b/F06染色��仓库/U_DyeClothInPut.pas
@@ -0,0 +1,620 @@
+unit U_DyeClothInPut;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
+ cxEdit, DB, cxDBData, cxCalendar, cxDropDownEdit, ComCtrls, ToolWin,
+ cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
+ cxClasses, cxControls, cxGridCustomView, cxGrid, cxGridCustomPopupMenu,
+ cxGridPopupMenu, ADODB, DBClient, cxButtonEdit, cxTextEdit, cxSpinEdit,
+ StdCtrls, ExtCtrls, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore,
+ dxSkinsDefaultPainters, cxNavigator, dxDateRanges, dxBarBuiltInMenu,
+ U_BaseInput, System.ImageList, Vcl.ImgList, dxScrollbarAnnotations, cxCheckBox;
+
+type
+ TfrmDyeClothInPut = class(TfrmBaseInput)
+ ToolBar1: TToolBar;
+ TBAdd: TToolButton;
+ TBDel: TToolButton;
+ TBSave: TToolButton;
+ TBClose: TToolButton;
+ DataSource3: TDataSource;
+ CDS_Sub: TClientDataSet;
+ ADOQueryCmd: TADOQuery;
+ ADOQueryMain: TADOQuery;
+ ADOQueryTemp: TADOQuery;
+ cxGridPopupMenu2: TcxGridPopupMenu;
+ ToolButton1: TToolButton;
+ cxGrid2: TcxGrid;
+ Tv1: TcxGridDBTableView;
+ v1Column6: TcxGridDBColumn;
+ Tv1ioTime: TcxGridDBColumn;
+ Tv1IOType: TcxGridDBColumn;
+ Tv1IONo: TcxGridDBColumn;
+ v2Column1: TcxGridDBColumn;
+ v2Column6: TcxGridDBColumn;
+ v1Column15: TcxGridDBColumn;
+ Tv1IONote: TcxGridDBColumn;
+ cxGrid2Level1: TcxGridLevel;
+ ToolButton2: TToolButton;
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ procedure TBAddClick(Sender: TObject);
+ procedure TBCloseClick(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure TBDelClick(Sender: TObject);
+ procedure TBSaveClick(Sender: TObject);
+ procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+ procedure ToolButton1Click(Sender: TObject);
+ procedure Tv1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
+ procedure v1Column13PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
+ procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
+ procedure ToolButton2Click(Sender: TObject);
+ procedure Tv1IONoPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
+ private
+ { Private declarations }
+ function SaveCKData(): Boolean;
+ public
+ { Public declarations }
+ FIOID, FStkName, FKHName, FWorkshop: string;
+ end;
+
+var
+ frmDyeClothInPut: TfrmDyeClothInPut;
+
+implementation
+
+uses
+ U_DataLink, U_RTFun, U_ZDYHelp, U_CompanySel, U_DyeClothStkSel, U_DyeCPImport,
+ U_DyePlanForCardSel;
+
+{$R *.dfm}
+
+procedure TfrmDyeClothInPut.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+ inherited;
+ Action := caFree;
+end;
+
+procedure TfrmDyeClothInPut.TBAddClick(Sender: TObject);
+begin
+
+ with CDS_Sub do
+ begin
+ Append;
+ FieldByName('IOTime').Value := Trim(FormatDateTime('yyyy-MM-dd hh:mm:ss', Now));
+ Post;
+ end;
+
+end;
+
+function TfrmDyeClothInPut.SaveCKData(): Boolean;
+var
+ MBCIOID, Maxno: string;
+ MStkID, maxStkID: string;
+begin
+ try
+ ADOQueryCmd.Connection.BeginTrans;
+ CDS_Sub.DisableControls;
+ with CDS_Sub do
+ begin
+ First;
+ while not eof do
+ begin
+ with ADOQueryTemp do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('select * from Dye_Cloth_IO where IOID=''' + Trim(CDS_Sub.fieldbyname('IOID').AsString) + '''');
+ Open;
+ end;
+ MBCIOID := Trim(ADOQueryTemp.fieldbyname('IOID').AsString);
+ if Trim(MBCIOID) = '' then
+ begin
+ if not GetLSNo(ADOQueryCmd, Maxno, 'R', 'Dye_Cloth_IO', 5, 1) then
+ raise Exception.Create('È¡³ÉÆ·³ö¿â±àºÅʧ°Ü£¡');
+ end
+ else
+ begin
+ Maxno := Trim(MBCIOID);
+ end;
+
+ with ADOQueryCmd do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('select * from Dye_Cloth_IO where IOID=''' + Trim(Maxno) + '''');
+ Open;
+ end;
+ with ADOQueryCmd do
+ begin
+ if Trim(MBCIOID) = '' then
+ begin
+ Append;
+ FieldByName('Filler').Value := Trim(DName);
+ FieldByName('FillTime').Value := SGetServerDate(ADOQueryTemp);
+ end
+ else
+ begin
+ Edit;
+ FieldByName('Editer').Value := Trim(DName);
+ FieldByName('EditTime').Value := SGetServerDate(ADOQueryTemp);
+ end;
+// RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_Sub, 'Dye_Cloth_IO', 2);
+
+ FieldByName('IOID').Value := Trim(Maxno);
+ FieldByName('IONo').Value := CDS_Sub.FieldByName('IONo').asString;
+ FieldByName('IOTime').Value := CDS_Sub.FieldByName('IOTime').asString;
+ FieldByName('IOType').Value := CDS_Sub.FieldByName('IOType').asString;
+ FieldByName('IONote').Value := CDS_Sub.FieldByName('IONote').asString;
+ FieldByName('Meter').Value := CDS_Sub.FieldByName('Meter').asString;
+ FieldByName('Piece').Value := CDS_Sub.FieldByName('Piece').asString;
+
+ FieldByName('IOFlag').Value := 'Èë¿â';
+ FieldByName('IOQtyFlag').Value := 1;
+ Post;
+ end;
+
+
+
+
+
+
+
+ /////////////////¿â´æ¸üÐÂ///////////////////////////////
+ if (CDS_Sub.FieldByName('IOType').AsString = '´ó»õ³ÉÆ·') or (CDS_Sub.FieldByName('IOType').AsString = 'Ñù²¼³ÉÆ·') then
+ begin
+ with ADOQueryTemp do
+ begin
+ Close;
+ sql.Clear;
+ sql.add(' SELECT StkID FROM Dye_Cloth_Stock WHERE OrderNo = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IONo').asString)));
+ SQL.Add(' and IOType = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IOType').asString)));
+ Open;
+ end;
+
+ MStkID := Trim(ADOQueryTemp.fieldbyname('StkID').AsString);
+ if Trim(MStkID) = '' then
+ begin
+ if not GetLSNo(ADOQueryCmd, maxStkID, 'KC', 'Dye_Cloth_Stock', 5, 1) then
+ raise Exception.Create('È¡³ÉÆ·³ö¿â±àºÅʧ°Ü£¡');
+ end
+ else
+ begin
+ maxStkID := Trim(MStkID);
+ end;
+
+ if ADOQueryTemp.IsEmpty then
+ begin
+ with ADOQueryCmd do
+ begin
+ Close;
+ SQL.Clear;
+ sql.Add('INSERT INTO Dye_Cloth_Stock(StkID,Workshop,IOType,IONote,StkExists,OrderNo,MainId,SubId,StkMeter,StkPiece)');
+ sql.Add(' SELECT StkID=' + quotedstr(maxStkID) + ',Workshop=''ӡȾһ³µ¼ä'',A.IOType,A.IONote,StkExists=1,A.IONO,A.IONO,A.IONO,A.Meter,A.Piece from Dye_Cloth_IO A ');
+ sql.Add(' where A.IOID=''' + Trim(Maxno) + '''');
+ ExecSQL;
+ end;
+ end;
+
+ with ADOQueryCmd do
+ begin
+ Close;
+ SQL.Clear;
+ SQL.Add(' update Dye_Cloth_IO set stkID = ' + QuotedStr(Trim(maxStkID)));
+ SQL.Add(' where IOID=''' + Trim(Maxno) + '''');
+ ExecSQL;
+ end;
+
+ with ADOQueryCmd do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('Update Dye_Cloth_Stock Set StkPiece=(select Sum(isnull(Piece,0)*IOQtyFlag) from Dye_Cloth_IO A where A.StkID =''' + Trim(maxStkID) + ''')');
+ sql.Add(',STKMeter=(select Sum(isnull(Meter,0)*IOQtyFlag) from Dye_Cloth_IO A where A.StkID =''' + Trim(maxStkID) + ''')');
+ sql.Add(' where StkID=''' + Trim(maxStkID) + '''');
+// sql.Add('where OrderNo=''' + Trim(CDS_Sub.fieldbyname('IONO').AsString) + '''');
+// SQL.Add(' and IOType = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IOType').asString)));
+ ExecSQL;
+ end;
+ with ADOQueryCmd do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('select * from Dye_Cloth_Stock where OrderNo=''' + Trim(CDS_Sub.fieldbyname('IONO').AsString) + '''');
+ SQL.Add(' and IOType = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IOType').asString)));
+ Open;
+ end;
+
+ if (ADOQueryCmd.FieldByName('StkPiece').AsString = '0') and (ADOQueryCmd.FieldByName('StkMeter').AsString = '0') then
+ begin
+ ADOQueryCmd.Edit;
+ ADOQueryCmd.FieldByName('StkExists').Value := 0;
+ ADOQueryCmd.Post;
+ end
+ else
+ begin
+ ADOQueryCmd.Edit;
+ ADOQueryCmd.FieldByName('StkExists').Value := 1;
+ ADOQueryCmd.Post;
+ end;
+
+ with ADOQueryTemp do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('select * from Dye_Cloth_Stock where OrderNo=''' + Trim(CDS_Sub.fieldbyname('IONO').AsString) + '''');
+ SQL.Add(' and IOType = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IOType').asString)));
+ Open;
+ end;
+
+ if ADOQueryTemp.FieldByName('StkMeter').Value < 0 then
+ raise Exception.Create('³ö¿âÊýÁ¿´óÓÚÈë¿âÊýÁ¿²»Äܱ£´æ£¡');
+
+ if ADOQueryTemp.FieldByName('StkPiece').Value < 0 then
+ raise Exception.Create('³ö¿âÆ¥Êý´óÓÚÈë¿âÆ¥Êý²»Äܱ£´æ£¡');
+
+ end
+ else if (CDS_Sub.FieldByName('IOType').AsString = '´ó»õ»ØÐÞ³ÉÆ·') or (CDS_Sub.FieldByName('IOType').AsString = 'Ñù²¼»ØÐÞ³ÉÆ·') then
+ begin
+ with ADOQueryTemp do
+ begin
+ Close;
+ sql.Clear;
+ sql.add(' SELECT StkID FROM Dye_Cloth_Stock WHERE OrderNo = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IONo').asString)));
+ SQL.Add(' and IOType = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IOType').asString)));
+ SQL.Add(' and IONote = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IONote').asString)));
+ Open;
+ end;
+
+ MStkID := Trim(ADOQueryTemp.fieldbyname('StkID').AsString);
+ if Trim(MStkID) = '' then
+ begin
+ if not GetLSNo(ADOQueryCmd, maxStkID, 'KC', 'Dye_Cloth_Stock', 5, 1) then
+ raise Exception.Create('È¡³ÉÆ·³ö¿â±àºÅʧ°Ü£¡');
+ end
+ else
+ begin
+ maxStkID := Trim(MStkID);
+ end;
+
+ if ADOQueryTemp.IsEmpty then
+ begin
+ with ADOQueryCmd do
+ begin
+ Close;
+ SQL.Clear;
+ sql.Add('INSERT INTO Dye_Cloth_Stock(StkID,Workshop,IOType,IONote,StkExists,OrderNo,MainId,SubId,StkMeter,StkPiece)');
+ sql.Add(' SELECT StkID=' + quotedstr(maxStkID) + ',Workshop=''ӡȾһ³µ¼ä'',A.IOType,A.IONote,StkExists=1,A.IONO,A.IONO,A.IONO,A.Meter,A.Piece from Dye_Cloth_IO A ');
+ sql.Add(' where A.IOID=''' + Trim(Maxno) + '''');
+ ExecSQL;
+ end;
+ end;
+
+ with ADOQueryCmd do
+ begin
+ Close;
+ SQL.Clear;
+ SQL.Add(' update Dye_Cloth_IO set stkID = ' + QuotedStr(Trim(maxStkID)));
+ SQL.Add(' where IOID=''' + Trim(Maxno) + '''');
+ ExecSQL;
+ end;
+
+ with ADOQueryCmd do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('Update Dye_Cloth_Stock Set StkPiece=(select Sum(isnull(Piece,0)*IOQtyFlag) from Dye_Cloth_IO A where A.StkID =''' + Trim(maxStkID) + ''')');
+ sql.Add(',STKMeter=(select Sum(isnull(Meter,0)*IOQtyFlag) from Dye_Cloth_IO A where A.StkID =''' + Trim(maxStkID) + ''')');
+ sql.Add(' where StkID=''' + Trim(maxStkID) + '''');
+// sql.Add('where OrderNo=''' + Trim(CDS_Sub.fieldbyname('IONO').AsString) + '''');
+// SQL.Add(' and IOType = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IOType').asString)));
+// SQL.Add(' and IONote = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IONote').asString)));
+ ExecSQL;
+ end;
+ with ADOQueryCmd do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('select * from Dye_Cloth_Stock where OrderNo=''' + Trim(CDS_Sub.fieldbyname('IONO').AsString) + '''');
+ SQL.Add(' and IOType = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IOType').asString)));
+ SQL.Add(' and IONote = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IONote').asString)));
+ Open;
+ end;
+
+ if (ADOQueryCmd.FieldByName('StkPiece').AsString = '0') and (ADOQueryCmd.FieldByName('StkMeter').AsString = '0') then
+ begin
+ ADOQueryCmd.Edit;
+ ADOQueryCmd.FieldByName('StkExists').Value := 0;
+ ADOQueryCmd.Post;
+ end
+ else
+ begin
+ ADOQueryCmd.Edit;
+ ADOQueryCmd.FieldByName('StkExists').Value := 1;
+ ADOQueryCmd.Post;
+ end;
+
+ with ADOQueryTemp do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('select * from Dye_Cloth_Stock where OrderNo=''' + Trim(CDS_Sub.fieldbyname('IONO').AsString) + '''');
+ SQL.Add(' and IOType = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IOType').asString)));
+ SQL.Add(' and IONote = ' + QuotedStr(Trim(CDS_Sub.FieldByName('IONote').asString)));
+ Open;
+ end;
+
+ if ADOQueryTemp.FieldByName('StkMeter').Value < 0 then
+ raise Exception.Create('³ö¿âÊýÁ¿´óÓÚÈë¿âÊýÁ¿²»Äܱ£´æ£¡');
+
+ if ADOQueryTemp.FieldByName('StkPiece').Value < 0 then
+ raise Exception.Create('³ö¿âÆ¥Êý´óÓÚÈë¿âÆ¥Êý²»Äܱ£´æ£¡');
+
+ end;
+
+ Edit;
+ FieldByName('IOID').Value := Trim(Maxno);
+ Post;
+ Next;
+ end;
+ end;
+ CDS_Sub.EnableControls;
+ ADOQueryCmd.Connection.CommitTrans;
+ Result := True;
+ except
+ CDS_Sub.EnableControls;
+ Result := False;
+ ADOQueryCmd.Connection.RollbackTrans;
+ application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
+ end;
+
+end;
+
+procedure TfrmDyeClothInPut.TBCloseClick(Sender: TObject);
+begin
+
+ Close;
+end;
+
+procedure TfrmDyeClothInPut.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
+begin
+ if Key = VK_ESCAPE then // VK_ESCAPE ÊÇ ESC ¼üµÄ³£Á¿
+ begin
+ Key := 0; // Çå³ý°´¼ü£¬·ÀÖ¹¼ÌÐø´«µÝ
+ Close; // »òÕß ModalResult := mrCancel;
+ end;
+end;
+
+procedure TfrmDyeClothInPut.FormShow(Sender: TObject);
+var
+ fsj: string;
+begin
+ inherited;
+ ReadCxGrid(FSTKName + '³ÉÆ·Èë¿â¼Èë', Tv1, '³ÉÆ·Èë¿â¼Èë');
+ with ADOQueryTemp do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add(' select A.* ');
+ sql.Add(' from V_Dye_Cloth_IO_cai A');
+ sql.Add(' where IOID=''' + Trim(FIOID) + '''');
+ Open;
+ end;
+ SCreateCDS(ADOQueryTemp, CDS_Sub);
+ SInitCDSData(ADOQueryTemp, CDS_Sub);
+ KeyPreview := True; // È·±£±íµ¥¿ÉÒÔÔ¤ÀÀ°´¼ü
+// fsj:='select name=CJName ,Code=null from CheJian';
+// SInitCxGridComboBoxBySql(ADOQueryTemp,v1CheJian,fsj,0,True,'');
+end;
+
+procedure TfrmDyeClothInPut.TBDelClick(Sender: TObject);
+begin
+ if CDS_Sub.IsEmpty then
+ Exit;
+
+ CDS_Sub.Delete;
+end;
+
+procedure TfrmDyeClothInPut.TBSaveClick(Sender: TObject);
+begin
+
+ if CDS_Sub.IsEmpty then
+ Exit;
+ if CDS_Sub.Locate('IOTime', null, []) = True then
+ begin
+ Application.MessageBox('Èë¿âʱ¼ä²»ÄÜΪ¿Õ!', 'Ìáʾ', 0);
+ Exit;
+ end;
+ if CDS_Sub.Locate('IOType', null, []) = True then
+ begin
+ Application.MessageBox('Èë¿âÀàÐͲ»ÄÜΪ¿Õ!', 'Ìáʾ', 0);
+ Exit;
+ end;
+
+ if CDS_Sub.Locate('IONO', null, []) = True then
+ begin
+ Application.MessageBox('Éú²ú¶©µ¥ºÅ²»ÄÜΪ¿Õ!', 'Ìáʾ', 0);
+ Exit;
+ end;
+
+ if CDS_Sub.Locate('Piece', null, []) = True then
+ begin
+ Application.MessageBox('Æ¥Êý²»ÄÜΪ¿Õ!', 'Ìáʾ', 0);
+ Exit;
+ end;
+ if CDS_Sub.Locate('Meter', null, []) = True then
+ begin
+ Application.MessageBox('Ã×Êý²»ÄÜΪ¿Õ!', 'Ìáʾ', 0);
+ Exit;
+ end;
+
+// if CDS_Sub.Locate('Meter', 0, []) = True then
+// begin
+// Application.MessageBox('Ã×Êý²»ÄÜΪ0!', 'Ìáʾ', 0);
+// Exit;
+// end;
+// if CDS_Sub.Locate('Piece', 0, []) = True then
+// begin
+// Application.MessageBox('Æ¥Êý²»ÄÜΪ0!', 'Ìáʾ', 0);
+// Exit;
+// end;
+
+ CDS_Sub.First;
+ while not CDS_Sub.Eof do
+ begin
+ if (CDS_Sub.FieldByName('Meter').AsFloat = 0) and (CDS_Sub.FieldByName('Piece').AsFloat = 0) then
+ begin
+ Application.MessageBox('ÊýÁ¿Æ¥Êý²»Äܶ¼Îª0!', 'Ìáʾ', 0);
+ Exit;
+ end;
+ CDS_Sub.Next;
+ end;
+
+ if CDS_Sub.Locate('IONO', null, []) = True then
+ begin
+ Application.MessageBox('Éú²ú¶©µ¥ºÅ²»ÄÜΪ¿Õ!', 'Ìáʾ', 0);
+ Exit;
+ end;
+ if SaveCKData() then
+ begin
+ Application.MessageBox('±£´æ³É¹¦!', 'Ìáʾ', 0);
+ //ModalResult:=1;
+ Exit;
+ end;
+end;
+
+procedure TfrmDyeClothInPut.ToolButton1Click(Sender: TObject);
+begin
+ WriteCxGrid(fSTKName + '³ÉÆ·Èë¿â¼Èë', Tv1, '³ÉÆ·Èë¿â¼Èë');
+
+end;
+
+procedure TfrmDyeClothInPut.ToolButton2Click(Sender: TObject);
+begin
+ try
+ frmDyeCPImport := TfrmDyeCPImport.Create(Application);
+ with frmDyeCPImport do
+ begin
+// FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
+ if ShowModal = 1 then
+ begin
+// Self.InitGrid();
+ end;
+ end;
+ finally
+ frmDyeCPImport.Free;
+ end;
+end;
+
+procedure TfrmDyeClothInPut.Tv1Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
+begin
+
+ try
+ frmCompanySel := TfrmCompanySel.Create(Application);
+ with frmCompanySel do
+ begin
+ if Trim(self.CDS_Sub.fieldbyname('IOType').AsString) = 'ÍË»¹' then
+ FCoType := '¿Í»§'
+ else
+ FCoType := '¹©Ó¦ÉÌ';
+ if ShowModal = 1 then
+ begin
+ with Self.CDS_Sub do
+ begin
+ Edit;
+ FieldByName('ToCoNo').Value := Trim(CDS_1.fieldbyname('CoCode').AsString);
+ FieldByName('ToCoName').Value := Trim(CDS_1.fieldbyname('CoAbbrName').AsString);
+ end;
+ end;
+ end;
+ finally
+ frmCompanySel.Free;
+ end;
+
+end;
+
+procedure TfrmDyeClothInPut.Tv1IONoPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
+begin
+
+ frmProductOrderListSel := TfrmProductOrderListSel.create(self);
+ with frmProductOrderListSel do
+ begin
+ if ShowModal = 1 then
+ begin
+ Self.CDS_Sub.Edit;
+ Self.CDS_Sub.FieldByName('IONO').Value := Order_Main.fieldbyname('OrderNo').asstring;
+ Self.CDS_Sub.Post;
+ end;
+ free;
+ end;
+// with ADOQueryTemp do
+// begin
+// Close;
+// SQL.Clear;
+// SQL.Add('select * from BS_Cloth_Info where C_Name = ' + QuotedStr(Trim(CDS_Sub.FieldByName('C_Name').asString)));
+// Open;
+// end;
+
+
+end;
+
+procedure TfrmDyeClothInPut.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+var
+ FFSPID: string;
+begin
+// if CDS_Sub.IsEmpty then
+// Exit;
+// if Trim(CDS_Sub.fieldbyname('BCIOID').AsString) <> '' then
+// begin
+// with ADOQueryTemp do
+// begin
+// Close;
+// sql.Clear;
+// sql.Add('select * from BS_Cloth_IO where BCIOID=''' + Trim(CDS_Sub.fieldbyname('BCIOID').AsString) + '''');
+// Open;
+// end;
+// FFSPID := Trim(ADOQueryTemp.fieldbyname('BCIOID').AsString);
+// if Trim(FFSPID) <> '' then
+// begin
+// v1CRType.Options.Editing := False;
+// end
+// else
+// begin
+// v1CRType.Options.Editing := True;
+// end;
+// end
+// else
+// begin
+// v1CRType.Options.Editing := True;
+// end;
+end;
+
+procedure TfrmDyeClothInPut.v1Column13PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
+begin
+// with ADOQueryTemp do
+// begin
+// close;
+// sql.Clear;
+// sql.Add('exec P_OrderCR');
+//
+//// ShowMessage(sql.Text);
+// execsql;
+// end;
+//
+// frmProductOrderListSel := TfrmProductOrderListSel.create(self);
+// with frmProductOrderListSel do
+// begin
+// FWorkshop := self.FWorkshop;
+// if ShowModal = 1 then
+// begin
+// Self.CDS_Sub.FieldByName('OrderNo').Value := Order_Main.fieldbyname('OrderNo').asstring;
+//// initGlide();
+// end;
+// free;
+// end;
+end;
+
+end.
+
diff --git a/F06染色��仓库/U_DyeClothOutList.dfm b/F06染色��仓库/U_DyeClothOutList.dfm
index 4e2f8ee..f4dfe05 100644
--- a/F06染色��仓库/U_DyeClothOutList.dfm
+++ b/F06染色��仓库/U_DyeClothOutList.dfm
@@ -73,6 +73,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
AutoSize = True
Caption = #25764#38144#20986#24211
ImageIndex = 11
+ Visible = False
OnClick = TBRKCXClick
end
object ToolButton1: TToolButton
@@ -128,6 +129,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
Color = clWhite
ParentBackground = False
TabOrder = 1
+ ExplicitTop = 39
object Label2: TLabel
Left = 70
Top = 36
@@ -137,11 +139,11 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
end
object Label3: TLabel
Left = 195
- Top = 10
- Width = 52
+ Top = 11
+ Width = 65
Height = 12
Hint = '0'
- Caption = #35745#21010#21333#21495
+ Caption = #29983#20135#35746#21333#21495
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
@@ -150,8 +152,8 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
ParentFont = False
end
object Label7: TLabel
- Left = 389
- Top = 10
+ Left = 401
+ Top = 11
Width = 26
Height = 12
Hint = '0'
@@ -164,7 +166,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
ParentFont = False
end
object Label10: TLabel
- Left = 535
+ Left = 547
Top = 36
Width = 39
Height = 12
@@ -178,26 +180,12 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
ParentFont = False
end
object Label5: TLabel
- Left = 362
+ Left = 203
Top = 36
Width = 52
Height = 12
Hint = '0'
- Caption = #20135#21697#21517#31216
- Font.Charset = GB2312_CHARSET
- Font.Color = clWindowText
- Font.Height = -12
- Font.Name = #23435#20307
- Font.Style = [fsBold]
- ParentFont = False
- end
- object Label23: TLabel
- Left = 195
- Top = 36
- Width = 52
- Height = 12
- Hint = '0'
- Caption = #20135#21697#32534#21495
+ Caption = #25104#21697#21517#31216
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
@@ -206,8 +194,8 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
ParentFont = False
end
object Label1: TLabel
- Left = 548
- Top = 10
+ Left = 560
+ Top = 11
Width = 26
Height = 12
Hint = '0'
@@ -277,7 +265,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
end
object OrderNo: TEdit
Tag = 2
- Left = 248
+ Left = 260
Top = 6
Width = 100
Height = 20
@@ -287,7 +275,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
end
object STKID: TEdit
Tag = 2
- Left = 575
+ Left = 587
Top = 32
Width = 100
Height = 20
@@ -297,7 +285,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
end
object C_Name: TEdit
Tag = 2
- Left = 417
+ Left = 258
Top = 32
Width = 100
Height = 20
@@ -307,7 +295,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
end
object C_Color: TEdit
Tag = 2
- Left = 417
+ Left = 429
Top = 6
Width = 100
Height = 20
@@ -315,24 +303,14 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
TabOrder = 8
OnKeyPress = orderNoKeyPress
end
- object C_Code: TEdit
- Tag = 2
- Left = 248
- Top = 32
- Width = 100
- Height = 20
- Hint = '0'
- TabOrder = 9
- OnKeyPress = orderNoKeyPress
- end
object PCId: TEdit
Tag = 2
- Left = 575
+ Left = 587
Top = 6
Width = 100
Height = 20
Hint = '0'
- TabOrder = 10
+ TabOrder = 9
OnKeyPress = orderNoKeyPress
end
end
@@ -453,6 +431,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
ParentFont = False
PopupMenu = PM_1
TabOrder = 3
+ ExplicitTop = 131
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@@ -535,13 +514,28 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
Options.Sorting = False
Width = 57
end
- object Tv1Column9: TcxGridDBColumn
- Caption = #20986#24211#21333#21495
- DataBinding.FieldName = 'IOID'
+ object v1Column1: TcxGridDBColumn
+ Caption = #29983#20135#35746#21333#21495
+ DataBinding.FieldName = 'IONO'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
- Width = 82
+ Width = 92
+ end
+ object v1Column13: TcxGridDBColumn
+ Caption = #25104#21697#21517#31216
+ DataBinding.FieldName = 'C_Name'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 81
+ end
+ object Tv1Column11: TcxGridDBColumn
+ Caption = #25104#21697#20986#24211#31867#22411
+ DataBinding.FieldName = 'IOType'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 123
end
object v1Column21: TcxGridDBColumn
Caption = #20986#24211#26102#38388
@@ -551,105 +545,71 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
Options.Editing = False
Width = 103
end
- object Tv1Column11: TcxGridDBColumn
- Caption = #20986#24211#31867#22411
- DataBinding.FieldName = 'IOType'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Width = 81
- end
- object v1Column1: TcxGridDBColumn
- Caption = #35745#21010#21333#21495
- DataBinding.FieldName = 'OrderNo'
+ object Tv1Column9: TcxGridDBColumn
+ Caption = #20986#24211#22791#27880
+ DataBinding.FieldName = 'IONote'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
- Width = 92
- end
- object Tv1Column4: TcxGridDBColumn
- Caption = #20135#21697#32534#21495
- DataBinding.FieldName = 'C_Code'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 78
- end
- object v1Column13: TcxGridDBColumn
- Caption = #20135#21697#21517#31216
- DataBinding.FieldName = 'C_Name'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 81
- end
- object v1Column4: TcxGridDBColumn
- Caption = #39068#33394
- DataBinding.FieldName = 'C_Color'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object v1Column18: TcxGridDBColumn
- Caption = #21345#21495
- DataBinding.FieldName = 'PCId'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
+ Width = 82
end
object v1Column10: TcxGridDBColumn
- Caption = #31859#25968
+ Caption = #25104#21697#31859#25968
DataBinding.FieldName = 'Meter'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
- Width = 66
+ Width = 88
end
object Tv1Piece: TcxGridDBColumn
- Caption = #21305#25968
+ Caption = #25104#21697#21305#25968
DataBinding.FieldName = 'Piece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 80
end
- object Tv1Column12: TcxGridDBColumn
- Caption = #24211#20301
- DataBinding.FieldName = 'IOPosition'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Width = 71
- end
- object v1Column12: TcxGridDBColumn
- Caption = #21697#36136
- DataBinding.FieldName = 'Grade'
+ object v1Column4: TcxGridDBColumn
+ Caption = #26448#36136
+ DataBinding.FieldName = 'Material'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
- Width = 66
- end
- object v1Column3: TcxGridDBColumn
- Caption = #38376#24133
- DataBinding.FieldName = 'C_Width'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object v1Column5: TcxGridDBColumn
- Caption = #20811#37325
- DataBinding.FieldName = 'C_GramWeight'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
+ Width = 87
end
object Tv1finishDescription: TcxGridDBColumn
- Caption = #21518#25972#29702#25551#36848
+ Caption = #25104#21697#21518#25972#29702#25551#36848
DataBinding.FieldName = 'finishDescription'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
- Width = 99
+ Width = 153
+ end
+ object Tv1Column1: TcxGridDBColumn
+ Caption = #22383#24067#20837#24211#31867#22411
+ DataBinding.FieldName = 'PB_ioType'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 90
+ end
+ object Tv1Column2: TcxGridDBColumn
+ Caption = #22383#24067#22791#27880
+ DataBinding.FieldName = 'PB_note'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 90
+ end
+ object Tv1Column4: TcxGridDBColumn
+ Caption = #22383#24067#21305#25968
+ DataBinding.FieldName = 'PB_piece'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 90
+ end
+ object Tv1Column3: TcxGridDBColumn
+ Caption = #22383#24067#31859#25968
+ DataBinding.FieldName = 'PB_Qty'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 90
end
end
object cxGrid1Level1: TcxGridLevel
diff --git a/F06染色��仓库/U_DyeClothOutList.pas b/F06染色��仓库/U_DyeClothOutList.pas
index eff8771..c24f060 100644
--- a/F06染色��仓库/U_DyeClothOutList.pas
+++ b/F06染色��仓库/U_DyeClothOutList.pas
@@ -48,30 +48,22 @@ type
v1Column22: TcxGridDBColumn;
v1Column21: TcxGridDBColumn;
v1Column1: TcxGridDBColumn;
- Tv1Column4: TcxGridDBColumn;
v1Column13: TcxGridDBColumn;
v1Column4: TcxGridDBColumn;
- v1Column18: TcxGridDBColumn;
v1Column10: TcxGridDBColumn;
- v1Column12: TcxGridDBColumn;
- v1Column3: TcxGridDBColumn;
- v1Column5: TcxGridDBColumn;
cxGrid1Level1: TcxGridLevel;
Label3: TLabel;
Label7: TLabel;
Label10: TLabel;
Label5: TLabel;
- Label23: TLabel;
Label1: TLabel;
OrderNo: TEdit;
STKID: TEdit;
C_Name: TEdit;
C_Color: TEdit;
- C_Code: TEdit;
PCId: TEdit;
Tv1Column9: TcxGridDBColumn;
Tv1Column11: TcxGridDBColumn;
- Tv1Column12: TcxGridDBColumn;
PM_1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
@@ -82,6 +74,10 @@ type
TbEdit: TToolButton;
TbDel: TToolButton;
Tv1finishDescription: TcxGridDBColumn;
+ Tv1Column1: TcxGridDBColumn;
+ Tv1Column2: TcxGridDBColumn;
+ Tv1Column3: TcxGridDBColumn;
+ Tv1Column4: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
@@ -147,8 +143,10 @@ procedure TfrmDyeClothOutList.FormCreate(Sender: TObject);
begin
inherited;
lstCust := TStringList.Create;
+// EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
+// BegDate.DateTime := EndDate.DateTime;
EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
- BegDate.DateTime := EndDate.DateTime;
+ BegDate.DateTime := EndDate.DateTime - 20;
FWorkshop := trim(Self.fParameters3);
end;
@@ -188,9 +186,9 @@ begin
sql.Add(' from ');
sql.Add('(select rownumber=cast((row_number() over(order by A.IOTime desc)) as int)');
sql.Add(',COUNT(1) OVER() AS TotalCount');
- sql.Add(',* from V_Dye_Cloth_IO A where A.IOFlag = ''³ö¿â'' ');
- if trim(FWorkshop) <> '' then
- sql.Add(' and Workshop=''' + trim(FWorkshop) + ''' ');
+ sql.Add(',* from V_Dye_Cloth_IO_out A where A.IOFlag = ''³ö¿â'' ');
+// if trim(FWorkshop) <> '' then
+// sql.Add(' and Workshop=''' + trim(FWorkshop) + ''' ');
sql.Add('and 1=1 ' + WSql);
sql.Add(') temp_row');
sql.Add(' where rownumber> ' + inttostr(((CurrentPage - 1) * RecordsNumber)));
@@ -242,57 +240,147 @@ begin
end;
procedure TfrmDyeClothOutList.TbDelClick(Sender: TObject);
-var
- MIOID: string;
begin
- if CDS_1.IsEmpty then
- Exit;
- if CDS_1.Locate('SSel', True, []) = False then
+ if CDS_1.Locate('ssel', True, []) = False then
begin
Application.MessageBox('ûÓÐÑ¡ÔñÊý¾Ý!', 'Ìáʾ', 0);
Exit;
end;
-
if Application.MessageBox('È·¶¨ÒªÉ¾³ýÊý¾ÝÂð£¿', 'Ìáʾ', 32 + 4) <> IDYES then
Exit;
- MIOID := '';
- CDS_1.DisableControls;
- with CDS_1 do
- begin
- First;
- while CDS_1.Locate('SSel', True, []) do
- begin
-
- MIOID := MIOID + ',' + Trim(CDS_1.fieldbyname('IOID').AsString);
- CDS_1.Delete;
- end;
- end;
- CDS_1.EnableControls;
try
ADOQueryCmd.Connection.BeginTrans;
- with ADOQueryCmd do
+ CDS_1.DisableControls;
+ with CDS_1 do
begin
- Close;
- Sql.Clear;
- Sql.Add('exec P_Dye_Cloth_Out_Del ');
- Sql.Add(' @IOIDS=' + quotedstr(MIOID));
- Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
- Sql.Add(',@DName=' + quotedstr(Trim(DName)));
- Open;
- end;
- if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
- raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
- ADOQueryCmd.Connection.CommitTrans;
+ First;
+ while not eof do
+ begin
+ if CDS_1.FieldByName('ssel').AsBoolean then
+ begin
+ with ADOQueryCmd do
+ begin
+ Close;
+ sql.Clear;
+ sql.add(' insert into Dye_Cloth_IO_Del select * from Dye_Cloth_IO where IOID=''' + trim(CDS_1.fieldbyname('IOID').AsString) + ''' ');
+ sql.Add(' update Dye_Cloth_IO_Del Set DelTime=Getdate(),Deler=''' + trim(DName) + ''' where IOID=''' + trim(CDS_1.fieldbyname('IOID').AsString) + ''' ');
+ sql.Add(' delete from Dye_Cloth_IO ');
+ sql.Add('where IOID =''' + Trim(CDS_1.FieldByName('IOID').asString) + ''' ');
+ ExecSQL;
+ end;
+
+
+ /////////////////////ÕûÀí¿â´æ////////////////
+ with ADOQueryCmd do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('Update Dye_Cloth_Stock Set StkPiece=(select Sum(isnull(Piece,0)*IOQtyFlag) from Dye_Cloth_IO A where A.StkID =''' + Trim(CDS_1.FieldByName('StkId').asString) + ''')');
+ sql.Add(',STKMeter=(select Sum(isnull(Meter,0)*IOQtyFlag) from Dye_Cloth_IO A where A.StkID =''' + Trim(CDS_1.FieldByName('StkId').asString) + ''')');
+ sql.Add(' where StkID =''' + Trim(CDS_1.FieldByName('StkId').asString) + ''' ');
+ ExecSQL;
+ end;
+ with ADOQueryCmd do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('select * from Dye_Cloth_Stock where StkID=''' + Trim(CDS_1.fieldbyname('StkID').AsString) + '''');
+ Open;
+ end;
+
+ if (ADOQueryCmd.FieldByName('StkPiece').AsString = '0') and (ADOQueryCmd.FieldByName('StkMeter').AsString = '0') then
+ begin
+ ADOQueryCmd.Edit;
+ ADOQueryCmd.FieldByName('StkExists').Value := 0;
+ ADOQueryCmd.Post;
+ end
+ else
+ begin
+ ADOQueryCmd.Edit;
+ ADOQueryCmd.FieldByName('StkExists').Value := 1;
+ ADOQueryCmd.Post;
+ end;
+
+ with ADOQueryTemp do
+ begin
+ Close;
+ sql.Clear;
+ sql.Add('select * from Dye_Cloth_Stock where StkID=''' + Trim(CDS_1.fieldbyname('StkID').AsString) + '''');
+ Open;
+ end;
+
+ if ADOQueryTemp.FieldByName('StkMeter').Value < 0 then
+ raise Exception.Create('³ö¿âÊýÁ¿´óÓÚÈë¿âÊýÁ¿²»Äܱ£´æ£¡');
+
+ if ADOQueryTemp.FieldByName('StkPiece').Value < 0 then
+ raise Exception.Create('³ö¿âÆ¥Êý´óÓÚÈë¿âÆ¥Êý²»Äܱ£´æ£¡');
+ end;
+ Next;
+ end;
+ end;
+ CDS_1.EnableControls;
+ ADOQueryCmd.Connection.CommitTrans;
except
+ CDS_1.EnableControls;
ADOQueryCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
- InitGrid();
end;
end;
+//var
+// MIOID: string;
+//begin
+// if CDS_1.IsEmpty then
+// Exit;
+//
+// if CDS_1.Locate('SSel', True, []) = False then
+// begin
+// Application.MessageBox('ûÓÐÑ¡ÔñÊý¾Ý!', 'Ìáʾ', 0);
+// Exit;
+// end;
+//
+// if Application.MessageBox('È·¶¨ÒªÉ¾³ýÊý¾ÝÂð£¿', 'Ìáʾ', 32 + 4) <> IDYES then
+// Exit;
+// MIOID := '';
+// CDS_1.DisableControls;
+// with CDS_1 do
+// begin
+// First;
+// while CDS_1.Locate('SSel', True, []) do
+// begin
+//
+// MIOID := MIOID + ',' + Trim(CDS_1.fieldbyname('IOID').AsString);
+// CDS_1.Delete;
+// end;
+// end;
+// CDS_1.EnableControls;
+//
+// try
+// ADOQueryCmd.Connection.BeginTrans;
+// with ADOQueryCmd do
+// begin
+// Close;
+// Sql.Clear;
+// Sql.Add('exec P_Dye_Cloth_Out_Del ');
+// Sql.Add(' @IOIDS=' + quotedstr(MIOID));
+// Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
+// Sql.Add(',@DName=' + quotedstr(Trim(DName)));
+// Open;
+// end;
+// if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
+// raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
+// ADOQueryCmd.Connection.CommitTrans;
+//
+// except
+// ADOQueryCmd.Connection.RollbackTrans;
+// application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
+// InitGrid();
+// end;
+//
+//end;
procedure TfrmDyeClothOutList.TbEditClick(Sender: TObject);
begin
@@ -302,7 +390,7 @@ begin
begin
FIOID := CDS_1.FieldByName('IOID').AsString;
-
+ TBAdd.Visible := False;
FWorkshop := self.FWorkshop;
if ShowModal = 1 then
begin
@@ -343,7 +431,7 @@ begin
with frmDyeClothOutPut do
begin
- FIOID := '';
+// FIOID := '';
FWorkshop := self.FWorkshop;
if ShowModal = 1 then
diff --git a/F06染色��仓库/U_DyeClothOutPut.dfm b/F06染色��仓库/U_DyeClothOutPut.dfm
index 37332fd..e42ef4c 100644
--- a/F06染色��仓库/U_DyeClothOutPut.dfm
+++ b/F06染色��仓库/U_DyeClothOutPut.dfm
@@ -85,6 +85,7 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
Height = 508
Align = alClient
TabOrder = 1
+ ExplicitTop = 44
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@@ -139,6 +140,15 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
HeaderAlignmentHorz = taCenter
Width = 41
end
+ object Tv1OrderNo: TcxGridDBColumn
+ Tag = 2
+ Caption = #29983#20135#35746#21333#21495
+ DataBinding.FieldName = 'IONo'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 90
+ end
object v1Column4: TcxGridDBColumn
Tag = 2
Caption = #20986#24211#31867#22411
@@ -151,18 +161,8 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
#29983#20135#36864#22238
#26399#21021#20837#24211)
HeaderAlignmentHorz = taCenter
- Options.Editing = False
Width = 81
end
- object v1Column6: TcxGridDBColumn
- Tag = 2
- Caption = #20986#24211#21333#21495
- DataBinding.FieldName = 'IOID'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 83
- end
object v1Column2: TcxGridDBColumn
Tag = 2
Caption = #20986#24211#26102#38388
@@ -176,22 +176,6 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
Options.Editing = False
Width = 101
end
- object Tv1OrderNo: TcxGridDBColumn
- Tag = 2
- Caption = #29983#20135#35746#21333#21495
- DataBinding.FieldName = 'IONo'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Width = 90
- end
- object Tv1Column4: TcxGridDBColumn
- Tag = 2
- Caption = #25104#21697#21517#31216
- DataBinding.FieldName = 'C_Name'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Width = 81
- end
object v2Column1: TcxGridDBColumn
Tag = 2
Caption = #25104#21697#21697#21517
@@ -208,13 +192,20 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
Options.Editing = False
Width = 99
end
+ object Tv1Column1: TcxGridDBColumn
+ Caption = #20986#24211#22791#27880
+ DataBinding.FieldName = 'IONote'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 111
+ end
object v1Column15: TcxGridDBColumn
Tag = 2
Caption = #21305#25968
DataBinding.FieldName = 'Piece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
- Width = 65
+ Width = 106
end
object v2Column6: TcxGridDBColumn
Tag = 2
@@ -223,16 +214,24 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
- Width = 85
+ Width = 106
end
- object v1Column13: TcxGridDBColumn
+ object v1Column6: TcxGridDBColumn
Tag = 2
- Caption = #25104#21697#38376#24133
- DataBinding.FieldName = 'C_Width'
+ Caption = #20986#24211#21333#21495
+ DataBinding.FieldName = 'IOID'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
- Width = 78
+ Width = 83
+ end
+ object Tv1Column3: TcxGridDBColumn
+ Caption = #24211#23384#21333#21495
+ DataBinding.FieldName = 'StkId'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 105
end
end
object cxGrid2Level1: TcxGridLevel
diff --git a/F06染色��仓库/U_DyeClothOutPut.pas b/F06染色��仓库/U_DyeClothOutPut.pas
index 8d06f3d..899095c 100644
--- a/F06染色��仓库/U_DyeClothOutPut.pas
+++ b/F06染色��仓库/U_DyeClothOutPut.pas
@@ -34,12 +34,12 @@ type
v1Column2: TcxGridDBColumn;
v1Column4: TcxGridDBColumn;
Tv1OrderNo: TcxGridDBColumn;
- Tv1Column4: TcxGridDBColumn;
v2Column1: TcxGridDBColumn;
v2Column6: TcxGridDBColumn;
v1Column15: TcxGridDBColumn;
- v1Column13: TcxGridDBColumn;
cxGrid2Level1: TcxGridLevel;
+ Tv1Column1: TcxGridDBColumn;
+ Tv1Column3: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBAddClick(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
@@ -93,15 +93,14 @@ begin
with Self.CDS_Sub do
begin
Append;
- FieldByName('IOTime').Value := Trim(FormatDateTime('yyyy-MM-dd hh:mm:ss',SGetServerDateTime(ADOQueryCmd)));
- FieldByName('STKID').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('BCIOID').Value;
+ FieldByName('IOTime').Value := Trim(FormatDateTime('yyyy-MM-dd hh:mm:ss', SGetServerDateTime(ADOQueryCmd)));
+// FieldByName('STKID').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('BCIOID').Value;
FieldByName('IOType').Value := '¼Ó¹¤³ö¿â';
FieldByName('IONO').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('OrderNo').Value;
- FieldByName('C_Name').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('C_Name').Value;
+ FieldByName('StkId').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('StkId').Value;
FieldByName('Piece').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('StkPiece').Value;
FieldByName('Meter').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('StkMeter').Value;
- FieldByName('C_Width').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('C_Width').Value;
end;
frmDyeClothStkSel.CDS_Main.Delete;
@@ -173,6 +172,8 @@ begin
FieldByName('IONo').Value := CDS_Sub.FieldByName('IONo').asString;
FieldByName('IOTime').Value := CDS_Sub.FieldByName('IOTime').asString;
FieldByName('IOType').Value := CDS_Sub.FieldByName('IOType').asString;
+ FieldByName('IOnote').Value := CDS_Sub.FieldByName('IOnote').asString;
+ FieldByName('StkId').Value := CDS_Sub.FieldByName('StkId').asString;
FieldByName('Meter').Value := CDS_Sub.FieldByName('Meter').asString;
FieldByName('Piece').Value := CDS_Sub.FieldByName('Piece').asString;
@@ -180,20 +181,22 @@ begin
FieldByName('IOQtyFlag').Value := -1;
Post;
end;
+
+/////////////////////ÕûÀí¿â´æ////////////////
with ADOQueryCmd do
begin
Close;
sql.Clear;
- sql.Add('Update Dye_Cloth_Stock Set StkPiece=(select Sum(isnull(Piece,0)*IOQtyFlag) from Dye_Cloth_IO A where A.IONO=Dye_Cloth_Stock.OrderNo)');
- sql.Add(',STKMeter=(select Sum(isnull(Meter,0)*IOQtyFlag) from Dye_Cloth_IO A where A.IONO=Dye_Cloth_Stock.OrderNo )');
- sql.Add('where OrderNo=''' + Trim(CDS_Sub.fieldbyname('IONO').AsString) + '''');
+ sql.Add('Update Dye_Cloth_Stock Set StkPiece=(select Sum(isnull(Piece,0)*IOQtyFlag) from Dye_Cloth_IO A where A.StkID =''' + Trim(CDS_Sub.FieldByName('StkId').asString) + ''')');
+ sql.Add(',STKMeter=(select Sum(isnull(Meter,0)*IOQtyFlag) from Dye_Cloth_IO A where A.StkID =''' + Trim(CDS_Sub.FieldByName('StkId').asString) + ''')');
+ sql.Add('where StkID =''' + Trim(CDS_Sub.FieldByName('StkId').asString) + ''' ');
ExecSQL;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
- sql.Add('select * from Dye_Cloth_Stock where OrderNo=''' + Trim(CDS_Sub.fieldbyname('IONO').AsString) + '''');
+ sql.Add('select * from Dye_Cloth_Stock where StkID=''' + Trim(CDS_Sub.fieldbyname('StkID').AsString) + '''');
Open;
end;
@@ -214,7 +217,7 @@ begin
begin
Close;
sql.Clear;
- sql.Add('select * from Dye_Cloth_Stock where OrderNo=''' + Trim(CDS_Sub.fieldbyname('IONO').AsString) + '''');
+ sql.Add('select * from Dye_Cloth_Stock where StkID=''' + Trim(CDS_Sub.fieldbyname('StkID').AsString) + '''');
Open;
end;
@@ -234,6 +237,7 @@ begin
ADOQueryCmd.Connection.CommitTrans;
Result := True;
except
+ CDS_Sub.EnableControls;
Result := False;
ADOQueryCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
@@ -247,8 +251,7 @@ begin
Close;
end;
-procedure TfrmDyeClothOutPut.FormKeyDown(Sender: TObject; var Key: Word;
- Shift: TShiftState);
+procedure TfrmDyeClothOutPut.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if Key = VK_ESCAPE then // VK_ESCAPE ÊÇ ESC ¼üµÄ³£Á¿
begin
@@ -268,7 +271,7 @@ begin
Close;
sql.Clear;
sql.Add(' select A.* ');
- sql.Add(' from V_Dye_Cloth_IO A');
+ sql.Add(' from V_Dye_Cloth_IO_out A');
sql.Add(' where IOID=''' + Trim(FIOID) + '''');
Open;
end;
@@ -281,43 +284,42 @@ end;
procedure TfrmDyeClothOutPut.TBDelClick(Sender: TObject);
begin
- if CDS_Sub.IsEmpty then
- Exit;
- if Trim(CDS_Sub.fieldbyname('IOID').AsString) <> '' then
- begin
- if Application.MessageBox('È·¶¨ÒªÉ¾³ýÊý¾ÝÂð£¿', 'Ìáʾ', 32 + 4) <> IDYES then
- Exit;
-
- try
- ADOQueryCmd.Connection.BeginTrans;
-// with ADOQueryCmd do
-// begin
-// Close;
-// Sql.Clear;
-// Sql.Add('exec P_BS_Cloth_Out_Del ');
-// Sql.Add(' @BCIOIDS=' + quotedstr(Trim(CDS_Sub.fieldbyname('BCIOID').AsString)));
-// Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
-// Sql.Add(',@DName=' + quotedstr(Trim(DName)));
-// Open;
-// end;
-// if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
-// raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
-
- ADOQueryCmd.Connection.CommitTrans;
- CDS_Sub.Delete;
- except
- ADOQueryCmd.Connection.RollbackTrans;
- application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
- end;
- end
- else
- CDS_Sub.Delete;
+// if CDS_Sub.IsEmpty then
+// Exit;
+// if Trim(CDS_Sub.fieldbyname('IOID').AsString) <> '' then
+// begin
+// if Application.MessageBox('È·¶¨ÒªÉ¾³ýÊý¾ÝÂð£¿', 'Ìáʾ', 32 + 4) <> IDYES then
+// Exit;
+//
+// try
+// ADOQueryCmd.Connection.BeginTrans;
+//// with ADOQueryCmd do
+//// begin
+//// Close;
+//// Sql.Clear;
+//// Sql.Add('exec P_BS_Cloth_Out_Del ');
+//// Sql.Add(' @BCIOIDS=' + quotedstr(Trim(CDS_Sub.fieldbyname('BCIOID').AsString)));
+//// Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
+//// Sql.Add(',@DName=' + quotedstr(Trim(DName)));
+//// Open;
+//// end;
+//// if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
+//// raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
+//
+// ADOQueryCmd.Connection.CommitTrans;
+// CDS_Sub.Delete;
+// except
+// ADOQueryCmd.Connection.RollbackTrans;
+// application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅÏ¢', 0);
+// end;
+// end
+// else
+ CDS_Sub.Delete;
end;
procedure TfrmDyeClothOutPut.TBSaveClick(Sender: TObject);
begin
-
if CDS_Sub.IsEmpty then
Exit;
if CDS_Sub.Locate('IOTime', null, []) = True then
diff --git a/F06染色��仓库/U_DyeClothStkList.dfm b/F06染色��仓库/U_DyeClothStkList.dfm
index 2137099..e122102 100644
--- a/F06染色��仓库/U_DyeClothStkList.dfm
+++ b/F06染色��仓库/U_DyeClothStkList.dfm
@@ -87,15 +87,8 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
Color = clWhite
ParentBackground = False
TabOrder = 1
- object Label2: TLabel
- Left = 70
- Top = 36
- Width = 12
- Height = 12
- Caption = #33267
- end
object Label3: TLabel
- Left = 195
+ Left = 49
Top = 10
Width = 52
Height = 12
@@ -109,7 +102,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
ParentFont = False
end
object Label7: TLabel
- Left = 388
+ Left = 242
Top = 10
Width = 26
Height = 12
@@ -123,7 +116,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
ParentFont = False
end
object Label10: TLabel
- Left = 545
+ Left = 399
Top = 36
Width = 39
Height = 12
@@ -137,7 +130,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
ParentFont = False
end
object Label5: TLabel
- Left = 374
+ Left = 228
Top = 36
Width = 39
Height = 12
@@ -151,7 +144,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
ParentFont = False
end
object lbl1: TLabel
- Left = 558
+ Left = 412
Top = 10
Width = 26
Height = 12
@@ -165,7 +158,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
ParentFont = False
end
object Label23: TLabel
- Left = 195
+ Left = 49
Top = 36
Width = 52
Height = 12
@@ -178,24 +171,6 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
Font.Style = [fsBold]
ParentFont = False
end
- object BegDate: TDateTimePicker
- Left = 88
- Top = 6
- Width = 87
- Height = 20
- Date = 40768.000000000000000000
- Time = 0.458268587972270300
- TabOrder = 1
- end
- object EndDate: TDateTimePicker
- Left = 88
- Top = 32
- Width = 87
- Height = 20
- Date = 40768.000000000000000000
- Time = 0.458268587972270300
- TabOrder = 2
- end
object begtime: TDateTimePicker
Left = 137
Top = 132
@@ -205,7 +180,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
Format = 'HH:mm'
Time = 39780.000000000000000000
Kind = dtkTime
- TabOrder = 3
+ TabOrder = 0
end
object endTime: TDateTimePicker
Left = 137
@@ -216,25 +191,41 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
Format = 'HH:mm'
Time = 0.999317129630071600
Kind = dtkTime
- TabOrder = 4
- end
- object IsJYTime: TCheckBox
- Left = 14
- Top = 8
- Width = 73
- Height = 17
- Caption = #26597#35810#26085#26399
- Font.Charset = GB2312_CHARSET
- Font.Color = clWindowText
- Font.Height = -12
- Font.Name = #23435#20307
- Font.Style = [fsBold]
- ParentFont = False
- TabOrder = 0
+ TabOrder = 1
end
object OrderNo: TEdit
Tag = 2
- Left = 253
+ Left = 107
+ Top = 6
+ Width = 100
+ Height = 20
+ Hint = '0'
+ TabOrder = 2
+ OnKeyPress = orderNoKeyPress
+ end
+ object STKID: TEdit
+ Tag = 2
+ Left = 444
+ Top = 32
+ Width = 100
+ Height = 20
+ Hint = '1'
+ TabOrder = 3
+ OnKeyPress = orderNoKeyPress
+ end
+ object C_Name: TEdit
+ Tag = 2
+ Left = 273
+ Top = 32
+ Width = 100
+ Height = 20
+ Hint = '0'
+ TabOrder = 4
+ OnKeyPress = orderNoKeyPress
+ end
+ object C_Color: TEdit
+ Tag = 2
+ Left = 274
Top = 6
Width = 100
Height = 20
@@ -242,19 +233,19 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
TabOrder = 5
OnKeyPress = orderNoKeyPress
end
- object STKID: TEdit
+ object PCId: TEdit
Tag = 2
- Left = 590
- Top = 32
+ Left = 444
+ Top = 6
Width = 100
Height = 20
- Hint = '1'
+ Hint = '0'
TabOrder = 6
OnKeyPress = orderNoKeyPress
end
- object C_Name: TEdit
+ object C_Code: TEdit
Tag = 2
- Left = 419
+ Left = 107
Top = 32
Width = 100
Height = 20
@@ -262,36 +253,6 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
TabOrder = 7
OnKeyPress = orderNoKeyPress
end
- object C_Color: TEdit
- Tag = 2
- Left = 420
- Top = 6
- Width = 100
- Height = 20
- Hint = '0'
- TabOrder = 8
- OnKeyPress = orderNoKeyPress
- end
- object PCId: TEdit
- Tag = 2
- Left = 590
- Top = 6
- Width = 100
- Height = 20
- Hint = '0'
- TabOrder = 9
- OnKeyPress = orderNoKeyPress
- end
- object C_Code: TEdit
- Tag = 2
- Left = 253
- Top = 32
- Width = 100
- Height = 20
- Hint = '0'
- TabOrder = 10
- OnKeyPress = orderNoKeyPress
- end
end
object Panel6: TPanel [2]
Left = 0
@@ -395,414 +356,165 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
'10000')
end
end
- object cxPageControl1: TcxPageControl [3]
+ object cxGrid1: TcxGrid [3]
Left = 0
Top = 132
Width = 1540
Height = 468
Align = alClient
+ BorderStyle = cxcbsNone
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = []
+ ParentFont = False
+ PopupMenu = PM_1
TabOrder = 3
- Properties.ActivePage = cxTabSheet2
- Properties.CustomButtons.Buttons = <>
- ClientRectBottom = 466
- ClientRectLeft = 2
- ClientRectRight = 1538
- ClientRectTop = 22
- object cxTabSheet1: TcxTabSheet
- Caption = #27719#24635
- ImageIndex = 0
- ExplicitLeft = 0
- ExplicitTop = 0
- ExplicitWidth = 0
- ExplicitHeight = 0
- object cxGrid1: TcxGrid
- Left = 0
- Top = 0
- Width = 1536
- Height = 444
- Align = alClient
- BorderStyle = cxcbsNone
- Font.Charset = GB2312_CHARSET
- Font.Color = clWindowText
- Font.Height = -12
- Font.Name = #23435#20307
- Font.Style = []
- ParentFont = False
- PopupMenu = PM_1
- TabOrder = 0
- object Tv1: TcxGridDBTableView
- Navigator.Buttons.CustomButtons = <>
- ScrollbarAnnotations.CustomAnnotations = <>
- OnFocusedRecordChanged = Tv1FocusedRecordChanged
- DataController.DataSource = DS_1
- DataController.Filter.AutoDataSetFilter = True
- DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
- DataController.Summary.DefaultGroupSummaryItems = <>
- DataController.Summary.FooterSummaryItems = <
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Kind = skCount
- end
- item
- Kind = skSum
- Column = v1Column10
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Format = #26816#39564#31995#25968'=#.##'
- Kind = skAverage
- end
- item
- Format = #25442#31639#31995#25968'=#.##'
- Kind = skAverage
- end
- item
- Kind = skCount
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end>
- DataController.Summary.SummaryGroups = <>
- OptionsCustomize.ColumnFiltering = False
- OptionsView.Footer = True
- OptionsView.GroupByBox = False
- OptionsView.IndicatorWidth = 30
- Styles.IncSearch = DataLink_DyeClothStk.SHuangSe
- Styles.Footer = DataLink_DyeClothStk.Default
- Styles.Header = DataLink_DyeClothStk.Default
- Styles.Inactive = DataLink_DyeClothStk.SHuangSe
- Styles.Selection = DataLink_DyeClothStk.SHuangSe
- object v1Column22: TcxGridDBColumn
- Caption = #36873#25321
- DataBinding.FieldName = 'SSel'
- DataBinding.IsNullValueType = True
- PropertiesClassName = 'TcxCheckBoxProperties'
- Properties.ImmediatePost = True
- Properties.NullStyle = nssUnchecked
- HeaderAlignmentHorz = taCenter
- Options.Sorting = False
- Width = 66
- end
- object v1Column1: TcxGridDBColumn
- Caption = #35745#21010#21333#21495
- DataBinding.FieldName = 'IONO'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 98
- end
- object Tv1Column4: TcxGridDBColumn
- Caption = #20135#21697#32534#21495
- DataBinding.FieldName = 'C_Code'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 89
- end
- object v1Column13: TcxGridDBColumn
- Caption = #20135#21697#21517#31216
- DataBinding.FieldName = 'C_Name'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 94
- end
- object v1Column4: TcxGridDBColumn
- Caption = #39068#33394
- DataBinding.FieldName = 'C_Color'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 89
- end
- object v1Column10: TcxGridDBColumn
- Caption = #24211#23384#31859#25968
- DataBinding.FieldName = 'StkMeter'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 84
- end
- object Tv1Column10: TcxGridDBColumn
- Caption = #24211#23384#21305#25968
- DataBinding.FieldName = 'StkPiece'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 80
- end
- object v1Column12: TcxGridDBColumn
- Caption = #21697#36136
- DataBinding.FieldName = 'Grade'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object v1Column3: TcxGridDBColumn
- Caption = #38376#24133
- DataBinding.FieldName = 'C_Width'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object v1Column5: TcxGridDBColumn
- Caption = #20811#37325
- DataBinding.FieldName = 'C_GramWeight'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object Tv1Column1: TcxGridDBColumn
- Caption = #21518#25972#29702#25551#36848
- DataBinding.FieldName = 'finishDescription'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Width = 80
- end
+ ExplicitTop = 133
+ object Tv1: TcxGridDBTableView
+ Navigator.Buttons.CustomButtons = <>
+ ScrollbarAnnotations.CustomAnnotations = <>
+ DataController.DataSource = DS_1
+ DataController.Filter.AutoDataSetFilter = True
+ DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
+ DataController.Summary.DefaultGroupSummaryItems = <>
+ DataController.Summary.FooterSummaryItems = <
+ item
+ Kind = skSum
end
- object cxGrid1Level1: TcxGridLevel
- GridView = Tv1
+ item
+ Kind = skSum
end
+ item
+ Kind = skCount
+ end
+ item
+ Kind = skSum
+ Column = v1Column10
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Format = #26816#39564#31995#25968'=#.##'
+ Kind = skAverage
+ end
+ item
+ Format = #25442#31639#31995#25968'=#.##'
+ Kind = skAverage
+ end
+ item
+ Kind = skCount
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ end
+ item
+ Kind = skSum
+ end>
+ DataController.Summary.SummaryGroups = <>
+ OptionsCustomize.ColumnFiltering = False
+ OptionsView.Footer = True
+ OptionsView.GroupByBox = False
+ OptionsView.IndicatorWidth = 30
+ Styles.IncSearch = DataLink_DyeClothStk.SHuangSe
+ Styles.Footer = DataLink_DyeClothStk.Default
+ Styles.Header = DataLink_DyeClothStk.Default
+ Styles.Inactive = DataLink_DyeClothStk.SHuangSe
+ Styles.Selection = DataLink_DyeClothStk.SHuangSe
+ object v1Column22: TcxGridDBColumn
+ Caption = #36873#25321
+ DataBinding.FieldName = 'SSel'
+ DataBinding.IsNullValueType = True
+ PropertiesClassName = 'TcxCheckBoxProperties'
+ Properties.ImmediatePost = True
+ Properties.NullStyle = nssUnchecked
+ HeaderAlignmentHorz = taCenter
+ Options.Sorting = False
+ Width = 66
+ end
+ object v1Column1: TcxGridDBColumn
+ Caption = #29983#20135#35746#21333#21495
+ DataBinding.FieldName = 'OrderNo'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 98
+ end
+ object v1Column13: TcxGridDBColumn
+ Caption = #25104#21697#21517#31216
+ DataBinding.FieldName = 'C_Name'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 94
+ end
+ object v1Column10: TcxGridDBColumn
+ Caption = #24211#23384#31859#25968
+ DataBinding.FieldName = 'StkMeter'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 84
+ end
+ object Tv1Column10: TcxGridDBColumn
+ Caption = #24211#23384#21305#25968
+ DataBinding.FieldName = 'StkPiece'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 80
+ end
+ object v1Column12: TcxGridDBColumn
+ Caption = #26448#36136
+ DataBinding.FieldName = 'Material'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 105
+ end
+ object v1Column3: TcxGridDBColumn
+ Caption = #20837#24211#31867#22411
+ DataBinding.FieldName = 'IOType'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 106
+ end
+ object v1Column5: TcxGridDBColumn
+ Caption = #25104#21697#22791#27880
+ DataBinding.FieldName = 'IONote'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 107
+ end
+ object Tv1Column1: TcxGridDBColumn
+ Caption = #25104#21697#21518#25972#29702#25551#36848
+ DataBinding.FieldName = 'finishDescription'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 141
end
end
- object cxTabSheet2: TcxTabSheet
- Caption = #26126#32454
- ImageIndex = 1
- object cxGrid2: TcxGrid
- Left = 0
- Top = 0
- Width = 1536
- Height = 444
- Align = alClient
- BorderStyle = cxcbsNone
- Font.Charset = GB2312_CHARSET
- Font.Color = clWindowText
- Font.Height = -12
- Font.Name = #23435#20307
- Font.Style = []
- ParentFont = False
- TabOrder = 0
- object Tv2: TcxGridDBTableView
- Navigator.Buttons.CustomButtons = <>
- ScrollbarAnnotations.CustomAnnotations = <>
- DataController.DataSource = DS_2
- DataController.Filter.AutoDataSetFilter = True
- DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
- DataController.Summary.DefaultGroupSummaryItems = <>
- DataController.Summary.FooterSummaryItems = <
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Kind = skCount
- Column = cxGridDBColumn12
- end
- item
- Kind = skSum
- Column = cxGridDBColumn8
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Format = #26816#39564#31995#25968'=#.##'
- Kind = skAverage
- end
- item
- Format = #25442#31639#31995#25968'=#.##'
- Kind = skAverage
- end
- item
- Kind = skCount
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end
- item
- Kind = skSum
- end>
- DataController.Summary.SummaryGroups = <>
- OptionsCustomize.ColumnFiltering = False
- OptionsView.Footer = True
- OptionsView.GroupByBox = False
- OptionsView.IndicatorWidth = 30
- Styles.IncSearch = DataLink_DyeClothStk.SHuangSe
- Styles.Footer = DataLink_DyeClothStk.Default
- Styles.Header = DataLink_DyeClothStk.Default
- Styles.Inactive = DataLink_DyeClothStk.SHuangSe
- Styles.Selection = DataLink_DyeClothStk.SHuangSe
- object cxGridDBColumn1: TcxGridDBColumn
- Caption = #36873#25321
- DataBinding.FieldName = 'SSel'
- DataBinding.IsNullValueType = True
- PropertiesClassName = 'TcxCheckBoxProperties'
- Properties.ImmediatePost = True
- Properties.NullStyle = nssUnchecked
- HeaderAlignmentHorz = taCenter
- Options.Sorting = False
- Width = 66
- end
- object cxGridDBColumn2: TcxGridDBColumn
- Caption = #20986#20837#24211#26102#38388
- DataBinding.FieldName = 'IOTime'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 103
- end
- object cxGridDBColumn3: TcxGridDBColumn
- Caption = #35745#21010#21333#21495
- DataBinding.FieldName = 'OrderNo'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 98
- end
- object cxGridDBColumn4: TcxGridDBColumn
- Caption = #20135#21697#32534#21495
- DataBinding.FieldName = 'C_Code'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 89
- end
- object cxGridDBColumn5: TcxGridDBColumn
- Caption = #20135#21697#21517#31216
- DataBinding.FieldName = 'C_Name'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 94
- end
- object Tv2Column1: TcxGridDBColumn
- Caption = #20986#20837#24211
- DataBinding.FieldName = 'IOFlag'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Width = 80
- end
- object cxGridDBColumn6: TcxGridDBColumn
- Caption = #39068#33394
- DataBinding.FieldName = 'C_Color'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 89
- end
- object cxGridDBColumn7: TcxGridDBColumn
- Caption = #21345#21495
- DataBinding.FieldName = 'PCId'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 95
- end
- object cxGridDBColumn8: TcxGridDBColumn
- Caption = #31859#25968
- DataBinding.FieldName = 'Meter'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object cxGridDBColumn9: TcxGridDBColumn
- Caption = #21305#25968
- DataBinding.FieldName = 'Piece'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object cxGridDBColumn10: TcxGridDBColumn
- Caption = #21697#36136
- DataBinding.FieldName = 'Grade'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object cxGridDBColumn12: TcxGridDBColumn
- Caption = #21367#26465#30721
- DataBinding.FieldName = 'CIID'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object cxGridDBColumn13: TcxGridDBColumn
- Caption = #38376#24133
- DataBinding.FieldName = 'C_Width'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object cxGridDBColumn14: TcxGridDBColumn
- Caption = #20811#37325
- DataBinding.FieldName = 'C_GramWeight'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Options.Editing = False
- Width = 66
- end
- object Tv2finishDescription: TcxGridDBColumn
- Caption = #21518#25972#29702#25551#36848
- DataBinding.FieldName = 'finishDescription'
- DataBinding.IsNullValueType = True
- HeaderAlignmentHorz = taCenter
- Width = 80
- end
- end
- object cxGridLevel1: TcxGridLevel
- GridView = Tv2
- end
- end
+ object cxGrid1Level1: TcxGridLevel
+ GridView = Tv1
end
end
inherited ADOQueryBaseCmd: TADOQuery
@@ -872,7 +584,6 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
end
end
object GPM2: TcxGridPopupMenu
- Grid = cxGrid2
PopupMenus = <>
Left = 736
Top = 280
diff --git a/F06染色��仓库/U_DyeClothStkList.pas b/F06染色��仓库/U_DyeClothStkList.pas
index ba27209..24b74d6 100644
--- a/F06染色��仓库/U_DyeClothStkList.pas
+++ b/F06染色��仓库/U_DyeClothStkList.pas
@@ -27,13 +27,9 @@ type
ADOQueryTemp: TADOQuery;
DS_1: TDataSource;
GPM_1: TcxGridPopupMenu;
- Label2: TLabel;
- BegDate: TDateTimePicker;
- EndDate: TDateTimePicker;
CDS_1: TClientDataSet;
begtime: TDateTimePicker;
endTime: TDateTimePicker;
- IsJYTime: TCheckBox;
ToolButton2: TToolButton;
ToolButton4: TToolButton;
Panel6: TPanel;
@@ -57,45 +53,22 @@ type
PM_1: TPopupMenu;
PM11: TMenuItem;
N1: TMenuItem;
- cxPageControl1: TcxPageControl;
- cxTabSheet1: TcxTabSheet;
- cxTabSheet2: TcxTabSheet;
+ GPM2: TcxGridPopupMenu;
+ CDS_2: TClientDataSet;
+ DS_2: TDataSource;
+ N2: TMenuItem;
cxGrid1: TcxGrid;
Tv1: TcxGridDBTableView;
v1Column22: TcxGridDBColumn;
v1Column1: TcxGridDBColumn;
- Tv1Column4: TcxGridDBColumn;
v1Column13: TcxGridDBColumn;
- v1Column4: TcxGridDBColumn;
v1Column10: TcxGridDBColumn;
Tv1Column10: TcxGridDBColumn;
v1Column12: TcxGridDBColumn;
v1Column3: TcxGridDBColumn;
v1Column5: TcxGridDBColumn;
- cxGrid1Level1: TcxGridLevel;
- cxGrid2: TcxGrid;
- Tv2: TcxGridDBTableView;
- cxGridDBColumn1: TcxGridDBColumn;
- cxGridDBColumn2: TcxGridDBColumn;
- cxGridDBColumn3: TcxGridDBColumn;
- cxGridDBColumn4: TcxGridDBColumn;
- cxGridDBColumn5: TcxGridDBColumn;
- cxGridDBColumn6: TcxGridDBColumn;
- cxGridDBColumn7: TcxGridDBColumn;
- cxGridDBColumn8: TcxGridDBColumn;
- cxGridDBColumn9: TcxGridDBColumn;
- cxGridDBColumn10: TcxGridDBColumn;
- cxGridDBColumn12: TcxGridDBColumn;
- cxGridDBColumn13: TcxGridDBColumn;
- cxGridDBColumn14: TcxGridDBColumn;
- cxGridLevel1: TcxGridLevel;
- GPM2: TcxGridPopupMenu;
- CDS_2: TClientDataSet;
- DS_2: TDataSource;
- Tv2Column1: TcxGridDBColumn;
- N2: TMenuItem;
- Tv2finishDescription: TcxGridDBColumn;
Tv1Column1: TcxGridDBColumn;
+ cxGrid1Level1: TcxGridLevel;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
@@ -115,9 +88,6 @@ type
procedure ToolButton4Click(Sender: TObject);
procedure PM11Click(Sender: TObject);
procedure N1Click(Sender: TObject);
- procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
- APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
- ANewItemRecordFocusingChanged: Boolean);
procedure N2Click(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
@@ -126,7 +96,6 @@ type
lstCust: TStringList;
procedure InitGrid();
procedure SetStatus();
- procedure InitSubGrid();
{ Private declarations }
public
canshu1, FWorkshop: string;
@@ -156,8 +125,6 @@ procedure TfrmDyeClothStkList.FormCreate(Sender: TObject);
begin
inherited;
lstCust := TStringList.Create;
- EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
- BegDate.DateTime := EndDate.DateTime - 20;
FWorkshop := trim(Self.fParameters3);
end;
@@ -179,11 +146,7 @@ begin
WSql := SGetFilters(Panel1, 1, 2);
if Trim(WSql) <> '' then
WSql := ' and ' + WSql;
- if IsJYTime.Checked then
- begin
- WSql := WSql + ' and IOTime>=' + quotedstr(FormatDateTime('yyyy-MM-dd', BegDate.DateTime));
- WSql := WSql + ' and IOTime<' + quotedstr(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1));
- end;
+
try
ADOQueryMain.DisableControls;
@@ -195,7 +158,7 @@ begin
sql.Clear;
sql.Add(' select top ' + inttostr(RecordsNumber) + ' * ');
sql.Add(' from ');
- sql.Add('(select rownumber=cast((row_number() over(order by AA.IOTime desc)) as int)');
+ sql.Add('(select rownumber=cast((row_number() over(order by AA.StkID desc)) as int)');
sql.Add(',COUNT(1) OVER() AS TotalCount');
sql.Add(',* from V_Dye_Cloth_Stk AA where 1=1 ');
if trim(FWorkshop) <> '' then
@@ -219,30 +182,6 @@ begin
end;
-procedure TfrmDyeClothStkList.InitSubGrid();
-begin
-
- try
- CDS_2.DisableControls;
-
- with ADOQueryTemp do
- begin
- Filtered := False;
- Close;
- sql.Clear;
- sql.Add(' select A.* from V_Dye_Cloth_IO A where A.IONo = ' + QuotedStr(Trim(CDS_1.FieldByName('IONO').AsString) ) );
-// showmessage(sql.text);
- Open;
- end;
- SCreateCDS(ADOQueryTemp, CDS_2);
- SInitCDSData(ADOQueryTemp, CDS_2);
-
- finally
- CDS_2.EnableControls;
- end;
-
-end;
-
procedure TfrmDyeClothStkList.TBRafreshClick(Sender: TObject);
begin
CurrentPage := 1;
@@ -276,15 +215,13 @@ begin
inherited;
ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, '³ÉÆ·¿â´æÁбí');
- ReadCxGrid(trim(self.Caption) + 'Tv2', Tv2, '³ÉÆ·¿â´æÁбí');
CurrentPage := 1;
RecordsNumber := 500;
canshu1 := Trim(Self.fParameters1);
InitGrid();
SetStatus();
- v1Column4.Visible := false;
- v1Column4.Hidden := true;
+
KeyPreview := True; // È·±£±íµ¥¿ÉÒÔÔ¤ÀÀ°´¼ü
end;
@@ -316,13 +253,6 @@ end;
-procedure TfrmDyeClothStkList.Tv1FocusedRecordChanged(
- Sender: TcxCustomGridTableView; APrevFocusedRecord,
- AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
-begin
- InitSubGrid();
-end;
-
procedure TfrmDyeClothStkList.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string);
begin
if lstCust <> nil then
diff --git a/F06染色��仓库/U_DyeClothStkSel.dfm b/F06染色��仓库/U_DyeClothStkSel.dfm
index a211cee..43c166f 100644
--- a/F06染色��仓库/U_DyeClothStkSel.dfm
+++ b/F06染色��仓库/U_DyeClothStkSel.dfm
@@ -2,8 +2,8 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
Left = 105
Top = 131
Caption = #24211#23384#36873#25321#21015#34920
- ClientHeight = 550
- ClientWidth = 1165
+ ClientHeight = 545
+ ClientWidth = 1138
Color = clWhite
Font.Charset = GB2312_CHARSET
Font.Height = -12
@@ -11,15 +11,15 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
Position = poMainFormCenter
OnClose = FormClose
OnKeyDown = FormKeyDown
- ExplicitWidth = 1181
- ExplicitHeight = 589
+ ExplicitWidth = 1154
+ ExplicitHeight = 584
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
- Width = 1165
+ Width = 1138
Height = 38
AutoSize = True
ButtonHeight = 38
@@ -82,7 +82,7 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
object Panel1: TPanel [1]
Left = 0
Top = 38
- Width = 1165
+ Width = 1138
Height = 36
Align = alTop
BevelInner = bvRaised
@@ -91,24 +91,24 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
ParentBackground = False
TabOrder = 1
object Label3: TLabel
- Left = 162
+ Left = 230
Top = 11
- Width = 24
+ Width = 48
Height = 12
- Caption = #21697#21517
+ Caption = #25104#21697#21517#31216
end
object Label5: TLabel
Left = 23
Top = 10
- Width = 48
+ Width = 60
Height = 12
- Caption = #35745#21010#21333#21495
+ Caption = #29983#20135#35746#21333#21495
end
object C_name: TEdit
Tag = 2
- Left = 192
- Top = 7
- Width = 100
+ Left = 284
+ Top = 6
+ Width = 119
Height = 20
TabOrder = 0
OnChange = TBFindClick
@@ -116,9 +116,9 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
end
object OrderNo: TEdit
Tag = 2
- Left = 71
+ Left = 83
Top = 6
- Width = 78
+ Width = 102
Height = 20
TabOrder = 1
OnKeyPress = OrderNoKeyPress
@@ -127,11 +127,12 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
object cxGrid2: TcxGrid [2]
Left = 0
Top = 74
- Width = 1165
- Height = 476
+ Width = 1138
+ Height = 471
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 2
+ ExplicitTop = 70
object Tv1: TcxGridDBTableView
OnDblClick = Tv1DblClick
Navigator.Buttons.CustomButtons = <>
@@ -198,7 +199,7 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
- Width = 81
+ Width = 88
end
object v2Column1: TcxGridDBColumn
Tag = 2
@@ -218,36 +219,36 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
end
object v2Column6: TcxGridDBColumn
Tag = 2
- Caption = #25968#37327
+ Caption = #24211#23384#25968#37327
DataBinding.FieldName = 'StkMeter'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Options.Editing = False
- Width = 85
+ Width = 95
end
object v1Column15: TcxGridDBColumn
- Caption = #21305#25968
+ Caption = #24211#23384#21305#25968
DataBinding.FieldName = 'StkPiece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
- Width = 65
+ Width = 97
end
object v1Column13: TcxGridDBColumn
- Caption = #25104#21697#38376#24133
- DataBinding.FieldName = 'C_Width'
+ Caption = #25104#21697#20837#24211#31867#22411
+ DataBinding.FieldName = 'IOType'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
- Width = 79
+ Width = 124
end
object Tv1Grade: TcxGridDBColumn
- Caption = #31561#32423
- DataBinding.FieldName = 'Grade'
+ Caption = #25104#21697#22791#27880
+ DataBinding.FieldName = 'IONote'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
- Width = 80
+ Width = 136
end
end
object cxGrid2Level1: TcxGridLevel
diff --git a/F06染色��仓库/U_DyeClothStkSel.pas b/F06染色��仓库/U_DyeClothStkSel.pas
index efa3cd7..4215b87 100644
--- a/F06染色��仓库/U_DyeClothStkSel.pas
+++ b/F06染色��仓库/U_DyeClothStkSel.pas
@@ -125,8 +125,9 @@ begin
Filtered := False;
Close;
sql.Clear;
- sql.Add(' select A.* ');
+ sql.Add(' select B.C_Name,A.* ');
sql.Add(' from Dye_Cloth_Stock A ');
+ sql.Add(' inner join Dye_Plan_Main B ON A.OrderNo = B.OrderNo');
SQL.Add(' where A.StkExists=1 ');
SQL.Add(' and (A.StkMeter>0 or A.StkPiece>0) ');
Open;
diff --git a/F06染色��仓库/U_DyePlanForCardSel.dfm b/F06染色��仓库/U_DyePlanForCardSel.dfm
new file mode 100644
index 0000000..6871508
--- /dev/null
+++ b/F06染色��仓库/U_DyePlanForCardSel.dfm
@@ -0,0 +1,391 @@
+object frmProductOrderListSel: TfrmProductOrderListSel
+ Left = -8
+ Top = -8
+ Caption = #35745#21010#21333#36873#25321
+ ClientHeight = 613
+ ClientWidth = 1370
+ Color = clWhite
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poDesktopCenter
+ WindowState = wsMaximized
+ OnClose = FormClose
+ OnDestroy = FormDestroy
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 12
+ object ToolBar1: TToolBar
+ Tag = 1
+ Left = 0
+ Top = 0
+ Width = 1370
+ Height = 38
+ AutoSize = True
+ ButtonHeight = 38
+ ButtonWidth = 91
+ Caption = 'ToolBar1'
+ Color = clSkyBlue
+ DisabledImages = DataLink_DyeClothStk.ImageList_new32
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = []
+ Images = DataLink_DyeClothStk.ImageList_new32
+ List = True
+ ParentColor = False
+ ParentFont = False
+ ShowCaptions = True
+ TabOrder = 0
+ object TBRafresh: TToolButton
+ Left = 0
+ Top = 0
+ AutoSize = True
+ Caption = #21047#26032
+ ImageIndex = 1
+ OnClick = TBRafreshClick
+ end
+ object TBFind: TToolButton
+ Left = 71
+ Top = 0
+ AutoSize = True
+ Caption = #36807#28388
+ ImageIndex = 0
+ Visible = False
+ OnClick = TBFindClick
+ end
+ object ToolButton3: TToolButton
+ Left = 142
+ Top = 0
+ AutoSize = True
+ Caption = #36873#25321
+ ImageIndex = 12
+ OnClick = ToolButton3Click
+ end
+ object ToolButton1: TToolButton
+ Left = 213
+ Top = 0
+ AutoSize = True
+ Caption = #20445#23384#26684#24335
+ ImageIndex = 16
+ OnClick = ToolButton1Click
+ end
+ object TBClose: TToolButton
+ Left = 308
+ Top = 0
+ AutoSize = True
+ Caption = #20851#38381
+ ImageIndex = 7
+ OnClick = TBCloseClick
+ end
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 38
+ Width = 1370
+ Height = 43
+ Align = alTop
+ BevelInner = bvRaised
+ BevelOuter = bvLowered
+ Color = clSkyBlue
+ TabOrder = 1
+ ExplicitTop = 18
+ object Label3: TLabel
+ Left = 292
+ Top = 14
+ Width = 52
+ Height = 12
+ Caption = #35745#21010#21333#21495
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label1: TLabel
+ Left = 23
+ Top = 14
+ Width = 52
+ Height = 12
+ Caption = #21046#21333#26085#26399
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label2: TLabel
+ Left = 164
+ Top = 14
+ Width = 6
+ Height = 12
+ Caption = '-'
+ end
+ object Label4: TLabel
+ Left = 524
+ Top = 14
+ Width = 52
+ Height = 12
+ Caption = #25104#21697#21517#31216
+ Font.Charset = GB2312_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -12
+ Font.Name = #23435#20307
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object OrderNo: TEdit
+ Tag = 2
+ Left = 349
+ Top = 10
+ Width = 149
+ Height = 20
+ TabOrder = 0
+ OnKeyPress = OrderNoKeyPress
+ end
+ object BegDate: TDateTimePicker
+ Left = 76
+ Top = 10
+ Width = 85
+ Height = 20
+ Date = 40675.000000000000000000
+ Format = 'yyyy-MM-dd'
+ Time = 0.464742650459811600
+ TabOrder = 1
+ end
+ object EndDate: TDateTimePicker
+ Left = 176
+ Top = 10
+ Width = 86
+ Height = 20
+ Date = 40675.000000000000000000
+ Format = 'yyyy-MM-dd'
+ Time = 0.464761099538009100
+ TabOrder = 2
+ end
+ object C_Name: TEdit
+ Tag = 2
+ Left = 581
+ Top = 10
+ Width = 149
+ Height = 20
+ TabOrder = 3
+ OnKeyPress = OrderNoKeyPress
+ end
+ end
+ object cxGrid1: TcxGrid
+ Left = 0
+ Top = 103
+ Width = 1370
+ Height = 510
+ Align = alClient
+ PopupMenu = PopupMenu1
+ TabOrder = 2
+ ExplicitTop = 109
+ object Tv1: TcxGridDBTableView
+ OnDblClick = Tv1DblClick
+ Navigator.Buttons.CustomButtons = <>
+ ScrollbarAnnotations.CustomAnnotations = <>
+ DataController.DataSource = DataSource1
+ DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
+ DataController.Summary.DefaultGroupSummaryItems = <>
+ DataController.Summary.FooterSummaryItems = <
+ item
+ Kind = skSum
+ Column = Tv1QtyOrder
+ end>
+ DataController.Summary.SummaryGroups = <>
+ OptionsCustomize.ColumnFiltering = False
+ OptionsView.Footer = True
+ OptionsView.GroupByBox = False
+ OptionsView.Indicator = True
+ Styles.IncSearch = DataLink_DyeClothStk.SHuangSe
+ Styles.Header = DataLink_DyeClothStk.Default
+ Styles.Inactive = DataLink_DyeClothStk.SHuangSe
+ Styles.Selection = DataLink_DyeClothStk.SHuangSe
+ object v1Column4: TcxGridDBColumn
+ Caption = #36873#25321
+ DataBinding.FieldName = 'SSel'
+ DataBinding.IsNullValueType = True
+ PropertiesClassName = 'TcxCheckBoxProperties'
+ Properties.ImmediatePost = True
+ Properties.NullStyle = nssUnchecked
+ HeaderAlignmentHorz = taCenter
+ Width = 44
+ end
+ object Tv1OrderNo: TcxGridDBColumn
+ Caption = #35745#21010#21333#21495
+ DataBinding.FieldName = 'OrderNo'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Focusing = False
+ Styles.Header = DataLink_DyeClothStk.Default
+ Width = 72
+ end
+ object Tv1C_CodeName: TcxGridDBColumn
+ Caption = #20135#21697#21517#31216
+ DataBinding.FieldName = 'C_Name'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Focusing = False
+ Styles.Header = DataLink_DyeClothStk.Default
+ Width = 82
+ end
+ object Tv1F_Name: TcxGridDBColumn
+ Caption = #22383#24067#21517#31216
+ DataBinding.FieldName = 'F_Name'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Focusing = False
+ Styles.Header = DataLink_DyeClothStk.Default
+ Width = 82
+ end
+ object v1Column3: TcxGridDBColumn
+ Caption = #20844#26020#25968
+ DataBinding.FieldName = 'PRTOrderKgQty'
+ DataBinding.IsNullValueType = True
+ Visible = False
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 52
+ end
+ object Tv1OrdDate: TcxGridDBColumn
+ Caption = #35746#21333#26085#26399
+ DataBinding.FieldName = 'OrdDate'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 80
+ end
+ object Tv1QtyOrder: TcxGridDBColumn
+ Caption = #35746#21333#25968#37327
+ DataBinding.FieldName = 'QtyOrder'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Focusing = False
+ Styles.Header = DataLink_DyeClothStk.Default
+ Width = 86
+ end
+ object Tv1DlyDate: TcxGridDBColumn
+ Caption = #20132#36135#26085#26399
+ DataBinding.FieldName = 'DlyDate'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Options.Editing = False
+ Width = 80
+ end
+ object Tv1C_PlanQty: TcxGridDBColumn
+ Caption = #35745#21010#25968#37327
+ DataBinding.FieldName = 'C_PlanQty'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 66
+ end
+ object Tv1C_description: TcxGridDBColumn
+ Caption = #24037#33402#35201#27714
+ DataBinding.FieldName = 'C_description'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 80
+ end
+ object Tv1finishDescription: TcxGridDBColumn
+ Caption = #21518#25972#29702#25551#36848
+ DataBinding.FieldName = 'finishDescription'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 100
+ end
+ object Tv1F_description: TcxGridDBColumn
+ Caption = #22383#24067#25551#36848
+ DataBinding.FieldName = 'F_description'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 80
+ end
+ object Tv1Column16: TcxGridDBColumn
+ Caption = #22791#27880
+ DataBinding.FieldName = 'ORDNOTE'
+ DataBinding.IsNullValueType = True
+ HeaderAlignmentHorz = taCenter
+ Width = 66
+ end
+ end
+ object cxGrid1Level1: TcxGridLevel
+ GridView = Tv1
+ end
+ end
+ object cxTabControl1: TcxTabControl
+ Left = 0
+ Top = 81
+ Width = 1370
+ Height = 22
+ Align = alTop
+ TabOrder = 3
+ Properties.CustomButtons.Buttons = <>
+ Properties.Style = 9
+ Properties.TabIndex = 0
+ Properties.Tabs.Strings = (
+ #26410#24320#21345
+ #24050#24320#21345
+ #20840#37096)
+ OnChange = cxTabControl1Change
+ ExplicitTop = 61
+ ClientRectBottom = 22
+ ClientRectRight = 1370
+ ClientRectTop = 19
+ end
+ object cxGridPopupMenu1: TcxGridPopupMenu
+ Grid = cxGrid1
+ PopupMenus = <>
+ Left = 544
+ Top = 176
+ end
+ object ADOQueryCmd: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ Parameters = <>
+ Left = 344
+ Top = 312
+ end
+ object ADOQueryMain: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ LockType = ltReadOnly
+ Parameters = <>
+ Left = 432
+ Top = 326
+ end
+ object ADOQueryTemp: TADOQuery
+ Connection = DataLink_DyeClothStk.ADOLink
+ LockType = ltReadOnly
+ Parameters = <>
+ Left = 224
+ Top = 296
+ end
+ object DataSource1: TDataSource
+ DataSet = Order_Main
+ Left = 464
+ Top = 168
+ end
+ object Order_Main: TClientDataSet
+ Aggregates = <>
+ Params = <>
+ Left = 760
+ Top = 232
+ end
+ object PopupMenu1: TPopupMenu
+ Left = 640
+ Top = 192
+ object N1: TMenuItem
+ Caption = #20840#36873
+ OnClick = N1Click
+ end
+ object N2: TMenuItem
+ Caption = #20840#24323
+ OnClick = N2Click
+ end
+ end
+end
diff --git a/F06染色��仓库/U_DyePlanForCardSel.pas b/F06染色��仓库/U_DyePlanForCardSel.pas
new file mode 100644
index 0000000..a6f6130
--- /dev/null
+++ b/F06染色��仓库/U_DyePlanForCardSel.pas
@@ -0,0 +1,253 @@
+unit U_DyePlanForCardSel;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
+ cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
+ cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
+ cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
+ cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
+ RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, cxLookAndFeels,
+ cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, cxPC, dxSkinsCore,
+ dxSkinsDefaultPainters, dxDateRanges, dxScrollbarAnnotations;
+
+type
+ TfrmProductOrderListSel = class(TForm)
+ ToolBar1: TToolBar;
+ TBClose: TToolButton;
+ Panel1: TPanel;
+ Tv1: TcxGridDBTableView;
+ cxGrid1Level1: TcxGridLevel;
+ cxGrid1: TcxGrid;
+ cxGridPopupMenu1: TcxGridPopupMenu;
+ ADOQueryCmd: TADOQuery;
+ ADOQueryMain: TADOQuery;
+ ADOQueryTemp: TADOQuery;
+ DataSource1: TDataSource;
+ Label3: TLabel;
+ OrderNo: TEdit;
+ Tv1OrderNo: TcxGridDBColumn;
+ Tv1F_Name: TcxGridDBColumn;
+ Order_Main: TClientDataSet;
+ Tv1C_CodeName: TcxGridDBColumn;
+ Tv1QtyOrder: TcxGridDBColumn;
+ ToolButton3: TToolButton;
+ v1Column4: TcxGridDBColumn;
+ v1Column3: TcxGridDBColumn;
+ Tv1DlyDate: TcxGridDBColumn;
+ PopupMenu1: TPopupMenu;
+ N1: TMenuItem;
+ N2: TMenuItem;
+ Tv1OrdDate: TcxGridDBColumn;
+ TBRafresh: TToolButton;
+ TBFind: TToolButton;
+ BegDate: TDateTimePicker;
+ EndDate: TDateTimePicker;
+ Label1: TLabel;
+ Label2: TLabel;
+ cxTabControl1: TcxTabControl;
+ Tv1C_PlanQty: TcxGridDBColumn;
+ Tv1Column16: TcxGridDBColumn;
+ ToolButton1: TToolButton;
+ Label4: TLabel;
+ C_Name: TEdit;
+ Tv1F_description: TcxGridDBColumn;
+ Tv1finishDescription: TcxGridDBColumn;
+ Tv1C_description: TcxGridDBColumn;
+ procedure FormDestroy(Sender: TObject);
+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
+ procedure TBCloseClick(Sender: TObject);
+ procedure FormShow(Sender: TObject);
+ procedure ToolButton3Click(Sender: TObject);
+// procedure OrderNoKeyPress(Sender: TObject; var Key: Char);
+ procedure Tv1DblClick(Sender: TObject);
+ procedure N1Click(Sender: TObject);
+ procedure N2Click(Sender: TObject);
+ procedure TBRafreshClick(Sender: TObject);
+ procedure TBFindClick(Sender: TObject);
+ procedure cxTabControl1Change(Sender: TObject);
+ procedure ToolButton1Click(Sender: TObject);
+ procedure OrderNoKeyPress(Sender: TObject; var Key: Char);
+ private
+ DQdate: TDateTime;
+ procedure InitGrid();
+ procedure InitForm();
+ { Private declarations }
+ public
+ FFInt, FCloth: Integer;
+ fWorkshop: string;
+ { Public declarations }
+ end;
+
+var
+ frmProductOrderListSel: TfrmProductOrderListSel;
+
+implementation
+
+uses
+ U_DataLink, U_RTFun;
+
+{$R *.dfm}
+
+procedure TfrmProductOrderListSel.FormDestroy(Sender: TObject);
+begin
+ frmProductOrderListSel := nil;
+end;
+
+procedure TfrmProductOrderListSel.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+ Action := caFree;
+end;
+
+procedure TfrmProductOrderListSel.TBCloseClick(Sender: TObject);
+begin
+ Close;
+
+end;
+
+procedure TfrmProductOrderListSel.InitGrid();
+begin
+ try
+ ADOQueryMain.DisableControls;
+ with ADOQueryMain do
+ begin
+ Close;
+ Filtered := False;
+ sql.Clear;
+ sql.Add('select A.* ');
+ sql.add('from Dye_Plan_Main A');
+// sql.Add('inner join Dye_Plan_Main B on B.mainID=A.mainID ');
+ sql.Add('where A.OrdDate>=''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''' ');
+ sql.Add('and A.OrdDate<''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''' ');
+// sql.Add('and B.Workshop=' + quotedstr(fWorkshop));
+
+// sql.Add('and isnull(B.status,''0'')=''9''');
+ if OrderNo.Text <> '' then
+ begin
+ SQL.Add('AND A.OrderNo like ''' + '%' + Trim(OrderNo.Text) + '%' + '''');
+ end;
+ if C_Name.Text <> '' then
+ begin
+ SQL.Add('AND A.C_Name like ''' + '%' + Trim(C_Name.Text) + '%' + '''');
+ end;
+
+ if cxTabControl1.TabIndex = 0 then
+ sql.Add('and not exists(select PCID from Dye_Plan_Card X where X.MainID=A.MainID)');
+ if cxTabControl1.TabIndex = 1 then
+ sql.Add('and exists(select PCID from Dye_Plan_Card X where X.MainID=A.MainID)');
+// ShowMessage(sql.text);
+ Open;
+ end;
+ SCreateCDS(ADOQueryMain, Order_Main);
+ SInitCDSData(ADOQueryMain, Order_Main);
+ finally
+ ADOQueryMain.EnableControls;
+ Tbfind.Click;
+ end;
+end;
+
+procedure TfrmProductOrderListSel.InitForm();
+begin
+ ReadCxGrid('ָʾµ¥ÁбíÑ¡Ôñ', Tv1, 'Éú²úָʾµ¥¹ÜÀí');
+ BegDate.DateTime := SGetServerDate(ADOQueryTemp);
+ EndDate.DateTime := SGetServerDate(ADOQueryTemp);
+ InitGrid();
+end;
+
+procedure TfrmProductOrderListSel.FormShow(Sender: TObject);
+begin
+
+ InitForm();
+ if FFInt = 1 then
+ begin
+ v1Column4.Visible := False;
+ v1Column4.Hidden := True;
+ end;
+ InitGrid();
+end;
+
+procedure TfrmProductOrderListSel.ToolButton1Click(Sender: TObject);
+begin
+ WriteCxGrid('ָʾµ¥ÁбíÑ¡Ôñ', Tv1, 'Éú²úָʾµ¥¹ÜÀí');
+end;
+
+procedure TfrmProductOrderListSel.ToolButton3Click(Sender: TObject);
+begin
+ if Order_Main.IsEmpty then
+ exit;
+ ModalResult := 1;
+end;
+
+//procedure TfrmProductOrderListSel.OrderNoKeyPress(Sender: TObject; var Key: Char);
+//begin
+// if Key = #13 then
+// begin
+// if Length(Trim(OrderNo.Text)) < 3 then
+// Exit;
+// try
+// ADOQueryMain.DisableControls;
+// with ADOQueryMain do
+// begin
+//
+// Close;
+// Filtered := False;
+// sql.Clear;
+// sql.Add('select B.*,A.*,A.OrderNo orderNoM ');
+// sql.add('from Dye_Plan_sub A');
+// sql.Add('inner join Dye_Plan_Main B on B.mainID=A.mainID ');
+// // sql.Add('left join Dye_PlanCon_Main C on C.conNO=B.conNO ');
+// SQL.Add('where B.OrderNo like ''' + '%' + Trim(OrderNo.Text) + '%' + '''');
+// Open;
+// end;
+// SCreateCDS(ADOQueryMain, Order_Main);
+// SInitCDSData(ADOQueryMain, Order_Main);
+// finally
+// ADOQueryMain.EnableControls;
+// end;
+// end;
+//end;
+
+procedure TfrmProductOrderListSel.Tv1DblClick(Sender: TObject);
+begin
+ ToolButton3.Click;
+end;
+
+procedure TfrmProductOrderListSel.N1Click(Sender: TObject);
+begin
+ SelOKNo(Order_Main, True);
+end;
+
+procedure TfrmProductOrderListSel.N2Click(Sender: TObject);
+begin
+ SelOKNo(Order_Main, false);
+end;
+
+procedure TfrmProductOrderListSel.OrderNoKeyPress(Sender: TObject;
+ var Key: Char);
+begin
+ InitGrid();
+end;
+
+procedure TfrmProductOrderListSel.TBRafreshClick(Sender: TObject);
+begin
+ initgrid();
+end;
+
+procedure TfrmProductOrderListSel.TBFindClick(Sender: TObject);
+begin
+ if ADOQueryMain.Active = False then
+ Exit;
+ SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
+ SCreateCDS(ADOQueryMain, Order_Main);
+ SInitCDSData(ADOQueryMain, Order_Main);
+end;
+
+procedure TfrmProductOrderListSel.cxTabControl1Change(Sender: TObject);
+begin
+ TBRafresh.Click;
+end;
+
+end.
+
diff --git a/F06染色��仓库/testDll.res b/F06染色��仓库/testDll.res
index e116c48..2465ca0 100644
Binary files a/F06染色��仓库/testDll.res and b/F06染色��仓库/testDll.res differ