260928
This commit is contained in:
parent
a516731625
commit
c12786ec4b
|
|
@ -173,6 +173,7 @@ inherited frmDyeGreyClothStkStats: TfrmDyeGreyClothStkStats
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
ExplicitTop = 111
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,7 @@ object frmProductOrderListSel: TfrmProductOrderListSel
|
||||||
DataBinding.FieldName = 'ORDNOTE'
|
DataBinding.FieldName = 'ORDNOTE'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 66
|
Width = 103
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -389,7 +389,7 @@ inherited frmDyePlanCardList: TfrmDyePlanCardList
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PM_1
|
PopupMenu = PM_1
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ExplicitLeft = 8
|
ExplicitTop = 111
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ inherited frmDyeTechnicsinput: TfrmDyeTechnicsinput
|
||||||
PopupMenu = PM_1
|
PopupMenu = PM_1
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
ExplicitLeft = 5
|
ExplicitLeft = 5
|
||||||
ExplicitTop = 119
|
ExplicitTop = 105
|
||||||
object TV1: TcxGridDBTableView
|
object TV1: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
Navigator.Buttons.Delete.Enabled = False
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -169,12 +169,11 @@ inherited frmDyeOutputList: TfrmDyeOutputList
|
||||||
Caption = #19994#21153#21592
|
Caption = #19994#21153#21592
|
||||||
end
|
end
|
||||||
object Label4: TLabel
|
object Label4: TLabel
|
||||||
Left = 876
|
Left = 414
|
||||||
Top = 17
|
Top = 12
|
||||||
Width = 24
|
Width = 48
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = #39068#33394
|
Caption = #25104#21697#21517#31216
|
||||||
Visible = False
|
|
||||||
end
|
end
|
||||||
object Label6: TLabel
|
object Label6: TLabel
|
||||||
Left = 876
|
Left = 876
|
||||||
|
|
@ -253,14 +252,13 @@ inherited frmDyeOutputList: TfrmDyeOutputList
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
OnChange = KaZuChange
|
OnChange = KaZuChange
|
||||||
end
|
end
|
||||||
object C_Color: TEdit
|
object C_Name: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 902
|
Left = 467
|
||||||
Top = 13
|
Top = 8
|
||||||
Width = 80
|
Width = 80
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
Visible = False
|
|
||||||
OnChange = KaZuChange
|
OnChange = KaZuChange
|
||||||
end
|
end
|
||||||
object C_ColorNo: TEdit
|
object C_ColorNo: TEdit
|
||||||
|
|
@ -333,7 +331,6 @@ inherited frmDyeOutputList: TfrmDyeOutputList
|
||||||
Height = 482
|
Height = 482
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ExplicitLeft = 8
|
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
@ -627,6 +624,8 @@ inherited frmDyeOutputList: TfrmDyeOutputList
|
||||||
end
|
end
|
||||||
inherited ADOQueryBaseTemp: TADOQuery
|
inherited ADOQueryBaseTemp: TADOQuery
|
||||||
Connection = DataLink_DyeProcess.ADOLink
|
Connection = DataLink_DyeProcess.ADOLink
|
||||||
|
Left = 73
|
||||||
|
Top = 145
|
||||||
end
|
end
|
||||||
object ADOQueryCmd: TADOQuery
|
object ADOQueryCmd: TADOQuery
|
||||||
Connection = DataLink_DyeProcess.ADOLink
|
Connection = DataLink_DyeProcess.ADOLink
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ type
|
||||||
Tv1Column8: TcxGridDBColumn;
|
Tv1Column8: TcxGridDBColumn;
|
||||||
Tv1Column11: TcxGridDBColumn;
|
Tv1Column11: TcxGridDBColumn;
|
||||||
Tv1Column12: TcxGridDBColumn;
|
Tv1Column12: TcxGridDBColumn;
|
||||||
C_Color: TEdit;
|
C_Name: TEdit;
|
||||||
Label4: TLabel;
|
Label4: TLabel;
|
||||||
C_ColorNo: TEdit;
|
C_ColorNo: TEdit;
|
||||||
Label6: TLabel;
|
Label6: TLabel;
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,7 @@ inherited frmDyePCDetailsList: TfrmDyePCDetailsList
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
Color = clSkyBlue
|
Color = clSkyBlue
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
ExplicitLeft = -1
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 260
|
Left = 260
|
||||||
Top = 10
|
Top = 10
|
||||||
|
|
@ -803,7 +804,6 @@ inherited frmDyePCDetailsList: TfrmDyePCDetailsList
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PM_2
|
PopupMenu = PM_2
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
ExplicitTop = 6
|
|
||||||
object Tv2: TcxGridDBTableView
|
object Tv2: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,14 @@
|
||||||
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.909,=D:\Dp10Repo\项目代码\RTBasics\F05染色检验\U_DyeClothInspList.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.909,=D:\Dp10Repo\项目代码\RTBasics\F05染色检验\U_DyeClothInspList.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
|
||||||
<Transaction>1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
||||||
|
<Transaction>1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas=</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas=</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.471,=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F05染色检验\U_DyeCardRoll.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.471,=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F05染色检验\U_DyeCardRoll.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
||||||
</Transactions>
|
</Transactions>
|
||||||
<ProjectSortOrder AutoSort="0" SortType="0">
|
<ProjectSortOrder AutoSort="0" SortType="0">
|
||||||
<File Path="..\..\D10sxYilanbuyi"/>
|
<File Path="..\..\D10sxYilanbuyi"/>
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -481,6 +481,20 @@ inherited frmDyeCardRoll: TfrmDyeCardRoll
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 80
|
Width = 80
|
||||||
end
|
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
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,8 @@ type
|
||||||
ToolButton3: TToolButton;
|
ToolButton3: TToolButton;
|
||||||
N3: TMenuItem;
|
N3: TMenuItem;
|
||||||
N4: TMenuItem;
|
N4: TMenuItem;
|
||||||
|
Tv1fillTime: TcxGridDBColumn;
|
||||||
|
Tv1filler: TcxGridDBColumn;
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -32,7 +32,9 @@ uses
|
||||||
U_DyePlanSel in '..\F00染色通用窗体\U_DyePlanSel.pas' {frmDyePlanSel},
|
U_DyePlanSel in '..\F00染色通用窗体\U_DyePlanSel.pas' {frmDyePlanSel},
|
||||||
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
|
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
|
||||||
U_DyeClothOutPut in 'U_DyeClothOutPut.pas' {frmDyeClothOutPut},
|
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}
|
{$R *.res}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -166,6 +166,14 @@
|
||||||
<Form>frmDyeClothStkSel</Form>
|
<Form>frmDyeClothStkSel</Form>
|
||||||
<FormType>dfm</FormType>
|
<FormType>dfm</FormType>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
|
<DCCReference Include="U_DyeCPImport.pas">
|
||||||
|
<Form>frmDyeCPImport</Form>
|
||||||
|
<FormType>dfm</FormType>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="U_DyePlanForCardSel.pas">
|
||||||
|
<Form>frmProductOrderListSel</Form>
|
||||||
|
<FormType>dfm</FormType>
|
||||||
|
</DCCReference>
|
||||||
<BuildConfiguration Include="Debug">
|
<BuildConfiguration Include="Debug">
|
||||||
<Key>Cfg_2</Key>
|
<Key>Cfg_2</Key>
|
||||||
<CfgParent>Base</CfgParent>
|
<CfgParent>Base</CfgParent>
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,47 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<BorlandProject>
|
<BorlandProject>
|
||||||
<Transactions>
|
<Transactions>
|
||||||
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm</Transaction>
|
|
||||||
<Transaction>1899-12-30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.642,=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F06染色成品仓库\U_DyeClothOutPut.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.642,=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F06染色成品仓库\U_DyeClothOutPut.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.443,=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothWaitStorage.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.443,=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothWaitStorage.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.dfm</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.144,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.420,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\DyeClothStk.dproj=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\InformationBase.dproj</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.420,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\DyeClothStk.dproj=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\InformationBase.dproj</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.975,=D:\Dp10Repo\public10\ThreeFun\Fun\U_CompressionFun.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.982,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.982,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.048,=D:\Dp10Repo\public10\design\U_BaseList.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.844,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_AttachmentUpload.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.783,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\Unit1.pas=</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.924,=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F06染色成品仓库\U_DyeCPImport.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.615,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothInEdit.dfm=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothOutEdit.dfm</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.615,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothInEdit.dfm=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothOutEdit.dfm</Transaction>
|
||||||
|
<Transaction>1899-12-30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas</Transaction>
|
||||||
|
<Transaction>1899-12-30 00:00:00.000.783,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\Unit1.pas=</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.004,=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F06染色成品仓库\U_DyePlanForCardSel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas=</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas=</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.pas=</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.pas=</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.944,=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F06染色成品仓库\U_DyeClothStkSel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.944,=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F06染色成品仓库\U_DyeClothStkSel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.710,=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothIOFlow.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.710,=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothIOFlow.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.361,=D:\Dp10Repo\项目代码\RTBasics\F00染色通用窗体\U_DyePlanSel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.537,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.537,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.361,=D:\Dp10Repo\项目代码\RTBasics\F00染色通用窗体\U_DyePlanSel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.615,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothInEdit.pas=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothOutEdit.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.615,D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothInEdit.pas=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothOutEdit.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.845,=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothInEdit.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.845,=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothInEdit.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.755,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas</Transaction>
|
|
||||||
<Transaction>1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas=</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.487,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelpSel.pas=</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.092,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_EmployeeSel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.144,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas</Transaction>
|
||||||
|
<Transaction>1899-12-30 00:00:00.000.716,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ProcessSel.pas</Transaction>
|
||||||
|
<Transaction>1899-12-30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.630,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas</Transaction>
|
|
||||||
<Transaction>1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
|
||||||
<Transaction>1899-12-30 00:00:00.000.045,=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothPSI.pas</Transaction>
|
<Transaction>1899-12-30 00:00:00.000.045,=D:\Dp10Repo\项目代码\RTBasics\F06染色成品仓库\U_DyeClothPSI.pas</Transaction>
|
||||||
|
<Transaction>1899-12-30 00:00:00.000.755,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas</Transaction>
|
||||||
</Transactions>
|
</Transactions>
|
||||||
<ProjectSortOrder AutoSort="0" SortType="0">
|
<ProjectSortOrder AutoSort="0" SortType="0">
|
||||||
<File Path="..\..\D10sxYilanbuyi"/>
|
<File Path="..\..\D10sxYilanbuyi"/>
|
||||||
|
|
@ -95,5 +97,9 @@
|
||||||
<File Path="U_DyeClothOutPut.dfm"/>
|
<File Path="U_DyeClothOutPut.dfm"/>
|
||||||
<File Path="U_DyeClothStkSel.pas"/>
|
<File Path="U_DyeClothStkSel.pas"/>
|
||||||
<File Path="U_DyeClothStkSel.dfm"/>
|
<File Path="U_DyeClothStkSel.dfm"/>
|
||||||
|
<File Path="U_DyeCPImport.pas"/>
|
||||||
|
<File Path="U_DyeCPImport.dfm"/>
|
||||||
|
<File Path="U_DyePlanForCardSel.pas"/>
|
||||||
|
<File Path="U_DyePlanForCardSel.dfm"/>
|
||||||
</ProjectSortOrder>
|
</ProjectSortOrder>
|
||||||
</BorlandProject>
|
</BorlandProject>
|
||||||
|
|
|
||||||
Binary file not shown.
218
F06染色成品仓库/U_DyeCPImport.dfm
Normal file
218
F06染色成品仓库/U_DyeCPImport.dfm
Normal file
|
|
@ -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
|
||||||
335
F06染色成品仓库/U_DyeCPImport.pas
Normal file
335
F06染色成品仓库/U_DyeCPImport.pas
Normal file
|
|
@ -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.
|
||||||
|
|
||||||
|
|
@ -42,16 +42,32 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
OnClick = TBRafreshClick
|
OnClick = TBRafreshClick
|
||||||
end
|
end
|
||||||
object TBRKCX: TToolButton
|
object ToolButton3: TToolButton
|
||||||
Left = 71
|
Left = 71
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25764#38144#20837#24211
|
Caption = #20837#24211
|
||||||
ImageIndex = 11
|
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
|
OnClick = TBRKCXClick
|
||||||
end
|
end
|
||||||
object ToolButton1: TToolButton
|
object ToolButton1: TToolButton
|
||||||
Left = 166
|
Left = 284
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25353#21333#25171#21360
|
Caption = #25353#21333#25171#21360
|
||||||
|
|
@ -59,7 +75,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
OnClick = ToolButton1Click
|
OnClick = ToolButton1Click
|
||||||
end
|
end
|
||||||
object ToolButton2: TToolButton
|
object ToolButton2: TToolButton
|
||||||
Left = 261
|
Left = 379
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #21246#36873#25171#21360
|
Caption = #21246#36873#25171#21360
|
||||||
|
|
@ -68,7 +84,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
OnClick = ToolButton2Click
|
OnClick = ToolButton2Click
|
||||||
end
|
end
|
||||||
object TBExport: TToolButton
|
object TBExport: TToolButton
|
||||||
Left = 356
|
Left = 474
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #23548#20986
|
Caption = #23548#20986
|
||||||
|
|
@ -76,7 +92,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
OnClick = TBExportClick
|
OnClick = TBExportClick
|
||||||
end
|
end
|
||||||
object ToolButton4: TToolButton
|
object ToolButton4: TToolButton
|
||||||
Left = 427
|
Left = 545
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20445#23384#26684#24335
|
Caption = #20445#23384#26684#24335
|
||||||
|
|
@ -84,7 +100,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
OnClick = ToolButton4Click
|
OnClick = ToolButton4Click
|
||||||
end
|
end
|
||||||
object TBClose: TToolButton
|
object TBClose: TToolButton
|
||||||
Left = 522
|
Left = 640
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20851#38381
|
Caption = #20851#38381
|
||||||
|
|
@ -111,12 +127,12 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
Caption = #33267
|
Caption = #33267
|
||||||
end
|
end
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 195
|
Left = 200
|
||||||
Top = 10
|
Top = 10
|
||||||
Width = 52
|
Width = 65
|
||||||
Height = 12
|
Height = 12
|
||||||
Hint = '0'
|
Hint = '0'
|
||||||
Caption = #35745#21010#21333#21495
|
Caption = #29983#20135#35746#21333#21495
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -12
|
Font.Height = -12
|
||||||
|
|
@ -125,12 +141,12 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label7: TLabel
|
object Label7: TLabel
|
||||||
Left = 365
|
Left = 598
|
||||||
Top = 10
|
Top = 10
|
||||||
Width = 26
|
Width = 26
|
||||||
Height = 12
|
Height = 12
|
||||||
Hint = '0'
|
Hint = '0'
|
||||||
Caption = #39068#33394
|
Caption = #26448#36136
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -12
|
Font.Height = -12
|
||||||
|
|
@ -139,12 +155,12 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label10: TLabel
|
object Label10: TLabel
|
||||||
Left = 511
|
Left = 403
|
||||||
Top = 36
|
Top = 36
|
||||||
Width = 39
|
Width = 52
|
||||||
Height = 12
|
Height = 12
|
||||||
Hint = '1'
|
Hint = '1'
|
||||||
Caption = #21367#26465#30721
|
Caption = #25104#21697#22791#27880
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -12
|
Font.Height = -12
|
||||||
|
|
@ -153,12 +169,12 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label5: TLabel
|
object Label5: TLabel
|
||||||
Left = 195
|
Left = 200
|
||||||
Top = 36
|
Top = 36
|
||||||
Width = 52
|
Width = 52
|
||||||
Height = 12
|
Height = 12
|
||||||
Hint = '0'
|
Hint = '0'
|
||||||
Caption = #20135#21697#21517#31216
|
Caption = #25104#21697#21517#31216
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -12
|
Font.Height = -12
|
||||||
|
|
@ -167,26 +183,12 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object lbl1: TLabel
|
object lbl1: TLabel
|
||||||
Left = 524
|
Left = 403
|
||||||
Top = 10
|
Top = 10
|
||||||
Width = 26
|
Width = 52
|
||||||
Height = 12
|
Height = 12
|
||||||
Hint = '0'
|
Hint = '0'
|
||||||
Caption = #21345#21495
|
Caption = #22383#24067#22791#27880
|
||||||
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
|
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -12
|
Font.Height = -12
|
||||||
|
|
@ -252,7 +254,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
end
|
end
|
||||||
object OrderNo: TEdit
|
object OrderNo: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 248
|
Left = 265
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -260,9 +262,9 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
OnKeyPress = orderNoKeyPress
|
OnKeyPress = orderNoKeyPress
|
||||||
end
|
end
|
||||||
object STKID: TEdit
|
object IONote: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 556
|
Left = 458
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -272,7 +274,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
end
|
end
|
||||||
object C_Name: TEdit
|
object C_Name: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 248
|
Left = 265
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -280,9 +282,9 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
OnKeyPress = CustNameKeyPress
|
OnKeyPress = CustNameKeyPress
|
||||||
end
|
end
|
||||||
object C_Color: TEdit
|
object Material: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 393
|
Left = 630
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -290,9 +292,9 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
OnKeyPress = CustNameKeyPress
|
OnKeyPress = CustNameKeyPress
|
||||||
end
|
end
|
||||||
object PCId: TEdit
|
object PB_note: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 556
|
Left = 458
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -300,16 +302,6 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
TabOrder = 9
|
TabOrder = 9
|
||||||
OnKeyPress = CustNameKeyPress
|
OnKeyPress = CustNameKeyPress
|
||||||
end
|
end
|
||||||
object C_Pattern: TEdit
|
|
||||||
Tag = 2
|
|
||||||
Left = 393
|
|
||||||
Top = 32
|
|
||||||
Width = 100
|
|
||||||
Height = 20
|
|
||||||
Hint = '0'
|
|
||||||
TabOrder = 10
|
|
||||||
OnKeyPress = CustNameKeyPress
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
object Panel6: TPanel [2]
|
object Panel6: TPanel [2]
|
||||||
Left = 0
|
Left = 0
|
||||||
|
|
@ -428,6 +420,7 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
PopupMenu = PM_1
|
PopupMenu = PM_1
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
ExplicitTop = 131
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
@ -444,11 +437,9 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Kind = skCount
|
Kind = skCount
|
||||||
Column = v1Column6
|
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Kind = skSum
|
Kind = skSum
|
||||||
Column = v1Column10
|
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Kind = skSum
|
Kind = skSum
|
||||||
|
|
@ -475,7 +466,6 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Kind = skCount
|
Kind = skCount
|
||||||
Column = v1Column23
|
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Kind = skSum
|
Kind = skSum
|
||||||
|
|
@ -507,141 +497,102 @@ inherited frmDyeClothInList: TfrmDyeClothInList
|
||||||
Options.Sorting = False
|
Options.Sorting = False
|
||||||
Width = 66
|
Width = 66
|
||||||
end
|
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
|
object v1Column1: TcxGridDBColumn
|
||||||
Caption = #35745#21010#21333#21495
|
Caption = #29983#20135#35746#21333#21495
|
||||||
DataBinding.FieldName = 'OrderNo'
|
DataBinding.FieldName = 'IONO'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 78
|
Width = 78
|
||||||
end
|
end
|
||||||
object v1Column13: TcxGridDBColumn
|
object v1Column13: TcxGridDBColumn
|
||||||
Caption = #20135#21697#21517#31216
|
Caption = #25104#21697#21517#31216
|
||||||
DataBinding.FieldName = 'C_Name'
|
DataBinding.FieldName = 'C_Name'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 66
|
Width = 90
|
||||||
end
|
end
|
||||||
object v1Column4: TcxGridDBColumn
|
object Tv1Column11: TcxGridDBColumn
|
||||||
Caption = #39068#33394
|
Caption = #25104#21697#20837#24211#31867#22411
|
||||||
DataBinding.FieldName = 'C_Color'
|
DataBinding.FieldName = 'IOType'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 66
|
Width = 110
|
||||||
end
|
end
|
||||||
object v1Column18: TcxGridDBColumn
|
object Tv1Column9: TcxGridDBColumn
|
||||||
Caption = #21345#21495
|
Caption = #20837#24211#26102#38388
|
||||||
DataBinding.FieldName = 'PCId'
|
DataBinding.FieldName = 'ioTime'
|
||||||
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'
|
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 71
|
Width = 71
|
||||||
end
|
end
|
||||||
object v1Column12: TcxGridDBColumn
|
object Tv1IONote: TcxGridDBColumn
|
||||||
Caption = #21697#36136
|
Caption = #25104#21697#22791#27880
|
||||||
DataBinding.FieldName = 'Grade'
|
DataBinding.FieldName = 'IONote'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Width = 80
|
||||||
Width = 66
|
|
||||||
end
|
end
|
||||||
object v1Column42: TcxGridDBColumn
|
object Tv1Meter: TcxGridDBColumn
|
||||||
Caption = #24635#35760#24405#25968
|
Caption = #25104#21697#31859#25968
|
||||||
DataBinding.FieldName = 'TotalCount'
|
DataBinding.FieldName = 'Meter'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Width = 103
|
||||||
Width = 66
|
|
||||||
end
|
end
|
||||||
object v1Column6: TcxGridDBColumn
|
object Tv1Piece: TcxGridDBColumn
|
||||||
Caption = #21367#26465#30721
|
Caption = #25104#21697#21305#25968
|
||||||
DataBinding.FieldName = 'CIID'
|
DataBinding.FieldName = 'Piece'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Width = 96
|
||||||
Width = 66
|
|
||||||
end
|
end
|
||||||
object v1Column3: TcxGridDBColumn
|
object Tv1Material: TcxGridDBColumn
|
||||||
Caption = #38376#24133
|
Caption = #26448#36136
|
||||||
DataBinding.FieldName = 'C_Width'
|
DataBinding.FieldName = 'Material'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Width = 80
|
||||||
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
|
|
||||||
end
|
end
|
||||||
object Tv1finishDescription: TcxGridDBColumn
|
object Tv1finishDescription: TcxGridDBColumn
|
||||||
Caption = #21518#25972#29702#25551#36848
|
Caption = #25104#21697#21518#25972#29702#25551#36848
|
||||||
DataBinding.FieldName = 'finishDescription'
|
DataBinding.FieldName = 'finishDescription'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 132
|
Width = 132
|
||||||
end
|
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
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
||||||
|
|
@ -46,41 +46,37 @@ type
|
||||||
cxGrid1: TcxGrid;
|
cxGrid1: TcxGrid;
|
||||||
Tv1: TcxGridDBTableView;
|
Tv1: TcxGridDBTableView;
|
||||||
v1Column22: TcxGridDBColumn;
|
v1Column22: TcxGridDBColumn;
|
||||||
v1Column21: TcxGridDBColumn;
|
|
||||||
v1Column1: TcxGridDBColumn;
|
v1Column1: TcxGridDBColumn;
|
||||||
v1Column13: 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;
|
cxGrid1Level1: TcxGridLevel;
|
||||||
Label3: TLabel;
|
Label3: TLabel;
|
||||||
Label7: TLabel;
|
Label7: TLabel;
|
||||||
Label10: TLabel;
|
Label10: TLabel;
|
||||||
Label5: TLabel;
|
Label5: TLabel;
|
||||||
lbl1: TLabel;
|
lbl1: TLabel;
|
||||||
Label20: TLabel;
|
|
||||||
OrderNo: TEdit;
|
OrderNo: TEdit;
|
||||||
STKID: TEdit;
|
IONote: TEdit;
|
||||||
C_Name: TEdit;
|
C_Name: TEdit;
|
||||||
C_Color: TEdit;
|
Material: TEdit;
|
||||||
PCId: TEdit;
|
PB_note: TEdit;
|
||||||
C_Pattern: TEdit;
|
|
||||||
Tv1Column9: TcxGridDBColumn;
|
Tv1Column9: TcxGridDBColumn;
|
||||||
Tv1Column11: TcxGridDBColumn;
|
Tv1Column11: TcxGridDBColumn;
|
||||||
Tv1Column12: TcxGridDBColumn;
|
|
||||||
PM_1: TPopupMenu;
|
PM_1: TPopupMenu;
|
||||||
PM11: TMenuItem;
|
PM11: TMenuItem;
|
||||||
ToolButton1: TToolButton;
|
ToolButton1: TToolButton;
|
||||||
N1: TMenuItem;
|
N1: TMenuItem;
|
||||||
N2: TMenuItem;
|
N2: TMenuItem;
|
||||||
Tv1finishDescription: TcxGridDBColumn;
|
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 FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure TBRafreshClick(Sender: TObject);
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
|
@ -107,6 +103,8 @@ type
|
||||||
procedure N2Click(Sender: TObject);
|
procedure N2Click(Sender: TObject);
|
||||||
procedure CustNameKeyPress(Sender: TObject; var Key: Char);
|
procedure CustNameKeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
private
|
private
|
||||||
CurrentPage, RecordsNumber: Integer;
|
CurrentPage, RecordsNumber: Integer;
|
||||||
lstCust: TStringList;
|
lstCust: TStringList;
|
||||||
|
|
@ -121,7 +119,7 @@ type
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink, U_RTFun, U_LabelPrint;
|
U_DataLink, U_RTFun, U_LabelPrint, U_DyeClothInPut;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
|
|
@ -149,8 +147,7 @@ begin
|
||||||
FWorkshop := trim(Self.fParameters3);
|
FWorkshop := trim(Self.fParameters3);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDyeClothInList.FormKeyDown(Sender: TObject; var Key: Word;
|
procedure TfrmDyeClothInList.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
Shift: TShiftState);
|
|
||||||
begin
|
begin
|
||||||
if Key = VK_ESCAPE then // VK_ESCAPE 是 ESC 键的常量
|
if Key = VK_ESCAPE then // VK_ESCAPE 是 ESC 键的常量
|
||||||
begin
|
begin
|
||||||
|
|
@ -185,15 +182,14 @@ begin
|
||||||
sql.Add(' from ');
|
sql.Add(' from ');
|
||||||
sql.Add('(select rownumber=cast((row_number() over(order by A.IOTime desc)) as int)');
|
sql.Add('(select rownumber=cast((row_number() over(order by A.IOTime desc)) as int)');
|
||||||
sql.Add(',COUNT(1) OVER() AS TotalCount');
|
sql.Add(',COUNT(1) OVER() AS TotalCount');
|
||||||
sql.Add(',* from V_Dye_Cloth_IO A where A.IOFlag = ''入库'' ');
|
sql.Add(',* from V_Dye_Cloth_IO_cai A where A.IOFlag = ''入库'' ');
|
||||||
if trim(FWorkshop) <> '' then
|
// if trim(FWorkshop) <> '' then
|
||||||
sql.Add(' and Workshop=''' + trim(FWorkshop) + ''' ');
|
// sql.Add(' and Workshop=''' + trim(FWorkshop) + ''' ');
|
||||||
sql.Add('and 1=1 ' + WSql);
|
sql.Add('and 1=1 ' + WSql);
|
||||||
sql.Add(') temp_row');
|
sql.Add(') temp_row');
|
||||||
sql.Add(' where rownumber> ' + inttostr(((CurrentPage - 1) * RecordsNumber)));
|
sql.Add(' where rownumber> ' + inttostr(((CurrentPage - 1) * RecordsNumber)));
|
||||||
sql.Add(' order by rownumber');
|
sql.Add(' order by rownumber');
|
||||||
|
|
||||||
|
|
||||||
// showmessage(sql.text);
|
// showmessage(sql.text);
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
|
|
@ -287,118 +283,303 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDyeClothInList.TBRKCXClick(Sender: TObject);
|
procedure TfrmDyeClothInList.TBRKCXClick(Sender: TObject);
|
||||||
var
|
|
||||||
MCIIDS, MIOIDS, MSTKIDS, MPCIDS: string;
|
|
||||||
begin
|
begin
|
||||||
if CDS_1.IsEmpty then
|
|
||||||
Exit;
|
if CDS_1.Locate('ssel', True, []) = False then
|
||||||
if not CDS_1.Locate('SSel', True, []) then
|
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
MCIIDS := '';
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
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;
|
Exit;
|
||||||
|
|
||||||
try
|
try
|
||||||
ADOQueryCmd.Connection.BeginTrans;
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
CDS_1.DisableControls;
|
||||||
|
with CDS_1 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not eof do
|
||||||
|
begin
|
||||||
|
if CDS_1.FieldByName('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('insert into Dye_Need_Up(UType,UDataId,UOperation,UOperator,UModule,UDetails) ');
|
sql.add('insert into Dye_Cloth_IO_Del select * from Dye_Cloth_IO where IOID=''' + trim(CDS_1.fieldbyname('IOID').AsString) + ''' ');
|
||||||
sql.Add('values(''染色成品入库'' ');
|
sql.Add('update Dye_Cloth_IO_Del Set DelTime=Getdate(),Deler=''' + trim(DName) + ''' where IOID=''' + trim(CDS_1.fieldbyname('IOID').AsString) + ''' ');
|
||||||
sql.Add(',' + quotedstr(MPCIDS));
|
sql.Add(' delete from Dye_Cloth_IO ');
|
||||||
sql.Add(',''撤销入库'' ');
|
sql.Add('where IOID =''' + Trim(CDS_1.FieldByName('IOID').asString) + ''' ');
|
||||||
sql.Add(',' + quotedstr(DName));
|
ExecSQL;
|
||||||
sql.Add(',' + quotedstr(trim(self.Caption)));
|
|
||||||
sql.Add(',' + quotedstr(MSTKIDS));
|
|
||||||
sql.Add(') ');
|
|
||||||
execsql;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////整理库存////////////////
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
Sql.Clear;
|
sql.Clear;
|
||||||
Sql.Add('exec P_Dye_Cloth_ReIn_cai ');
|
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('@StkIds=' + quotedstr(trim(MSTKIDS)));
|
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(',@IOIDS=' + quotedstr(trim(MIOIDS)));
|
sql.Add('where StkID =''' + Trim(CDS_1.FieldByName('StkId').asString) + ''' ');
|
||||||
Sql.Add(',@FillId=' + quotedstr(trim(dcode)));
|
ExecSQL;
|
||||||
Sql.Add(',@Filler=' + quotedstr(trim(dname)));
|
end;
|
||||||
// ShowMessage(sql.Text);
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add('select * from Dye_Cloth_Stock where StkID=''' + Trim(CDS_1.fieldbyname('StkID').AsString) + '''');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
|
if (ADOQueryCmd.FieldByName('StkPiece').AsString = '0') and (ADOQueryCmd.FieldByName('StkMeter').AsString = '0') then
|
||||||
begin
|
begin
|
||||||
raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
|
ADOQueryCmd.Edit;
|
||||||
|
ADOQueryCmd.FieldByName('StkExists').Value := 0;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Edit;
|
||||||
|
ADOQueryCmd.FieldByName('StkExists').Value := 1;
|
||||||
|
ADOQueryCmd.Post;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
with ADOQueryCmd do
|
with ADOQueryTemp 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
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
|
sql.Add('select * from Dye_Cloth_Stock where StkID=''' + Trim(CDS_1.fieldbyname('StkID').AsString) + '''');
|
||||||
sql.Add(' ' + quotedstr(trim(DName)));
|
Open;
|
||||||
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;
|
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;
|
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
|
// with ADOQueryCmd do
|
||||||
// begin
|
// begin
|
||||||
// Close;
|
// Close;
|
||||||
// sql.Clear;
|
// 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;
|
// execsql;
|
||||||
// end;
|
// end;
|
||||||
InitGrid();
|
//
|
||||||
except
|
// with ADOQueryCmd do
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
// begin
|
||||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
// Close;
|
||||||
end;
|
// Sql.Clear;
|
||||||
end;
|
// 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);
|
procedure TfrmDyeClothInList.Tv1DataControllerFilterBeforeChange(Sender: TcxDBDataFilterCriteria; ADataSet: TDataSet; const AFilterText: string);
|
||||||
begin
|
begin
|
||||||
|
|
@ -537,10 +718,50 @@ begin
|
||||||
end;
|
end;
|
||||||
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);
|
procedure TfrmDyeClothInList.ToolButton4Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, '成品入库列表');
|
WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, '成品入库列表');
|
||||||
end;
|
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.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
288
F06染色成品仓库/U_DyeClothInPut.dfm
Normal file
288
F06染色成品仓库/U_DyeClothInPut.dfm
Normal file
|
|
@ -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
|
||||||
620
F06染色成品仓库/U_DyeClothInPut.pas
Normal file
620
F06染色成品仓库/U_DyeClothInPut.pas
Normal file
|
|
@ -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.
|
||||||
|
|
||||||
|
|
@ -73,6 +73,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #25764#38144#20986#24211
|
Caption = #25764#38144#20986#24211
|
||||||
ImageIndex = 11
|
ImageIndex = 11
|
||||||
|
Visible = False
|
||||||
OnClick = TBRKCXClick
|
OnClick = TBRKCXClick
|
||||||
end
|
end
|
||||||
object ToolButton1: TToolButton
|
object ToolButton1: TToolButton
|
||||||
|
|
@ -128,6 +129,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
Color = clWhite
|
Color = clWhite
|
||||||
ParentBackground = False
|
ParentBackground = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
ExplicitTop = 39
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 70
|
Left = 70
|
||||||
Top = 36
|
Top = 36
|
||||||
|
|
@ -137,11 +139,11 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
end
|
end
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 195
|
Left = 195
|
||||||
Top = 10
|
Top = 11
|
||||||
Width = 52
|
Width = 65
|
||||||
Height = 12
|
Height = 12
|
||||||
Hint = '0'
|
Hint = '0'
|
||||||
Caption = #35745#21010#21333#21495
|
Caption = #29983#20135#35746#21333#21495
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -12
|
Font.Height = -12
|
||||||
|
|
@ -150,8 +152,8 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label7: TLabel
|
object Label7: TLabel
|
||||||
Left = 389
|
Left = 401
|
||||||
Top = 10
|
Top = 11
|
||||||
Width = 26
|
Width = 26
|
||||||
Height = 12
|
Height = 12
|
||||||
Hint = '0'
|
Hint = '0'
|
||||||
|
|
@ -164,7 +166,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label10: TLabel
|
object Label10: TLabel
|
||||||
Left = 535
|
Left = 547
|
||||||
Top = 36
|
Top = 36
|
||||||
Width = 39
|
Width = 39
|
||||||
Height = 12
|
Height = 12
|
||||||
|
|
@ -178,26 +180,12 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label5: TLabel
|
object Label5: TLabel
|
||||||
Left = 362
|
Left = 203
|
||||||
Top = 36
|
Top = 36
|
||||||
Width = 52
|
Width = 52
|
||||||
Height = 12
|
Height = 12
|
||||||
Hint = '0'
|
Hint = '0'
|
||||||
Caption = #20135#21697#21517#31216
|
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 Label23: TLabel
|
|
||||||
Left = 195
|
|
||||||
Top = 36
|
|
||||||
Width = 52
|
|
||||||
Height = 12
|
|
||||||
Hint = '0'
|
|
||||||
Caption = #20135#21697#32534#21495
|
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -12
|
Font.Height = -12
|
||||||
|
|
@ -206,8 +194,8 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 548
|
Left = 560
|
||||||
Top = 10
|
Top = 11
|
||||||
Width = 26
|
Width = 26
|
||||||
Height = 12
|
Height = 12
|
||||||
Hint = '0'
|
Hint = '0'
|
||||||
|
|
@ -277,7 +265,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
end
|
end
|
||||||
object OrderNo: TEdit
|
object OrderNo: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 248
|
Left = 260
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -287,7 +275,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
end
|
end
|
||||||
object STKID: TEdit
|
object STKID: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 575
|
Left = 587
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -297,7 +285,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
end
|
end
|
||||||
object C_Name: TEdit
|
object C_Name: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 417
|
Left = 258
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -307,7 +295,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
end
|
end
|
||||||
object C_Color: TEdit
|
object C_Color: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 417
|
Left = 429
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -315,24 +303,14 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
OnKeyPress = orderNoKeyPress
|
OnKeyPress = orderNoKeyPress
|
||||||
end
|
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
|
object PCId: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 575
|
Left = 587
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
Hint = '0'
|
Hint = '0'
|
||||||
TabOrder = 10
|
TabOrder = 9
|
||||||
OnKeyPress = orderNoKeyPress
|
OnKeyPress = orderNoKeyPress
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -453,6 +431,7 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
PopupMenu = PM_1
|
PopupMenu = PM_1
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
ExplicitTop = 131
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
@ -535,13 +514,28 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
Options.Sorting = False
|
Options.Sorting = False
|
||||||
Width = 57
|
Width = 57
|
||||||
end
|
end
|
||||||
object Tv1Column9: TcxGridDBColumn
|
object v1Column1: TcxGridDBColumn
|
||||||
Caption = #20986#24211#21333#21495
|
Caption = #29983#20135#35746#21333#21495
|
||||||
DataBinding.FieldName = 'IOID'
|
DataBinding.FieldName = 'IONO'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
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
|
end
|
||||||
object v1Column21: TcxGridDBColumn
|
object v1Column21: TcxGridDBColumn
|
||||||
Caption = #20986#24211#26102#38388
|
Caption = #20986#24211#26102#38388
|
||||||
|
|
@ -551,105 +545,71 @@ inherited frmDyeClothOutList: TfrmDyeClothOutList
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 103
|
Width = 103
|
||||||
end
|
end
|
||||||
object Tv1Column11: TcxGridDBColumn
|
object Tv1Column9: TcxGridDBColumn
|
||||||
Caption = #20986#24211#31867#22411
|
Caption = #20986#24211#22791#27880
|
||||||
DataBinding.FieldName = 'IOType'
|
DataBinding.FieldName = 'IONote'
|
||||||
DataBinding.IsNullValueType = True
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Width = 81
|
|
||||||
end
|
|
||||||
object v1Column1: TcxGridDBColumn
|
|
||||||
Caption = #35745#21010#21333#21495
|
|
||||||
DataBinding.FieldName = 'OrderNo'
|
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 92
|
Width = 82
|
||||||
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
|
|
||||||
end
|
end
|
||||||
object v1Column10: TcxGridDBColumn
|
object v1Column10: TcxGridDBColumn
|
||||||
Caption = #31859#25968
|
Caption = #25104#21697#31859#25968
|
||||||
DataBinding.FieldName = 'Meter'
|
DataBinding.FieldName = 'Meter'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 66
|
Width = 88
|
||||||
end
|
end
|
||||||
object Tv1Piece: TcxGridDBColumn
|
object Tv1Piece: TcxGridDBColumn
|
||||||
Caption = #21305#25968
|
Caption = #25104#21697#21305#25968
|
||||||
DataBinding.FieldName = 'Piece'
|
DataBinding.FieldName = 'Piece'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 80
|
Width = 80
|
||||||
end
|
end
|
||||||
object Tv1Column12: TcxGridDBColumn
|
object v1Column4: TcxGridDBColumn
|
||||||
Caption = #24211#20301
|
Caption = #26448#36136
|
||||||
DataBinding.FieldName = 'IOPosition'
|
DataBinding.FieldName = 'Material'
|
||||||
DataBinding.IsNullValueType = True
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Width = 71
|
|
||||||
end
|
|
||||||
object v1Column12: TcxGridDBColumn
|
|
||||||
Caption = #21697#36136
|
|
||||||
DataBinding.FieldName = 'Grade'
|
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 66
|
Width = 87
|
||||||
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
|
end
|
||||||
object Tv1finishDescription: TcxGridDBColumn
|
object Tv1finishDescription: TcxGridDBColumn
|
||||||
Caption = #21518#25972#29702#25551#36848
|
Caption = #25104#21697#21518#25972#29702#25551#36848
|
||||||
DataBinding.FieldName = 'finishDescription'
|
DataBinding.FieldName = 'finishDescription'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
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
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
|
|
||||||
|
|
@ -48,30 +48,22 @@ type
|
||||||
v1Column22: TcxGridDBColumn;
|
v1Column22: TcxGridDBColumn;
|
||||||
v1Column21: TcxGridDBColumn;
|
v1Column21: TcxGridDBColumn;
|
||||||
v1Column1: TcxGridDBColumn;
|
v1Column1: TcxGridDBColumn;
|
||||||
Tv1Column4: TcxGridDBColumn;
|
|
||||||
v1Column13: TcxGridDBColumn;
|
v1Column13: TcxGridDBColumn;
|
||||||
v1Column4: TcxGridDBColumn;
|
v1Column4: TcxGridDBColumn;
|
||||||
v1Column18: TcxGridDBColumn;
|
|
||||||
v1Column10: TcxGridDBColumn;
|
v1Column10: TcxGridDBColumn;
|
||||||
v1Column12: TcxGridDBColumn;
|
|
||||||
v1Column3: TcxGridDBColumn;
|
|
||||||
v1Column5: TcxGridDBColumn;
|
|
||||||
cxGrid1Level1: TcxGridLevel;
|
cxGrid1Level1: TcxGridLevel;
|
||||||
Label3: TLabel;
|
Label3: TLabel;
|
||||||
Label7: TLabel;
|
Label7: TLabel;
|
||||||
Label10: TLabel;
|
Label10: TLabel;
|
||||||
Label5: TLabel;
|
Label5: TLabel;
|
||||||
Label23: TLabel;
|
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
OrderNo: TEdit;
|
OrderNo: TEdit;
|
||||||
STKID: TEdit;
|
STKID: TEdit;
|
||||||
C_Name: TEdit;
|
C_Name: TEdit;
|
||||||
C_Color: TEdit;
|
C_Color: TEdit;
|
||||||
C_Code: TEdit;
|
|
||||||
PCId: TEdit;
|
PCId: TEdit;
|
||||||
Tv1Column9: TcxGridDBColumn;
|
Tv1Column9: TcxGridDBColumn;
|
||||||
Tv1Column11: TcxGridDBColumn;
|
Tv1Column11: TcxGridDBColumn;
|
||||||
Tv1Column12: TcxGridDBColumn;
|
|
||||||
PM_1: TPopupMenu;
|
PM_1: TPopupMenu;
|
||||||
N1: TMenuItem;
|
N1: TMenuItem;
|
||||||
N2: TMenuItem;
|
N2: TMenuItem;
|
||||||
|
|
@ -82,6 +74,10 @@ type
|
||||||
TbEdit: TToolButton;
|
TbEdit: TToolButton;
|
||||||
TbDel: TToolButton;
|
TbDel: TToolButton;
|
||||||
Tv1finishDescription: TcxGridDBColumn;
|
Tv1finishDescription: TcxGridDBColumn;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
Tv1Column4: TcxGridDBColumn;
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure TBRafreshClick(Sender: TObject);
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
|
@ -147,8 +143,10 @@ procedure TfrmDyeClothOutList.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
lstCust := TStringList.Create;
|
lstCust := TStringList.Create;
|
||||||
|
// EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||||
|
// BegDate.DateTime := EndDate.DateTime;
|
||||||
EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||||
BegDate.DateTime := EndDate.DateTime;
|
BegDate.DateTime := EndDate.DateTime - 20;
|
||||||
FWorkshop := trim(Self.fParameters3);
|
FWorkshop := trim(Self.fParameters3);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -188,9 +186,9 @@ begin
|
||||||
sql.Add(' from ');
|
sql.Add(' from ');
|
||||||
sql.Add('(select rownumber=cast((row_number() over(order by A.IOTime desc)) as int)');
|
sql.Add('(select rownumber=cast((row_number() over(order by A.IOTime desc)) as int)');
|
||||||
sql.Add(',COUNT(1) OVER() AS TotalCount');
|
sql.Add(',COUNT(1) OVER() AS TotalCount');
|
||||||
sql.Add(',* from V_Dye_Cloth_IO A where A.IOFlag = ''³ö¿â'' ');
|
sql.Add(',* from V_Dye_Cloth_IO_out A where A.IOFlag = ''出库'' ');
|
||||||
if trim(FWorkshop) <> '' then
|
// if trim(FWorkshop) <> '' then
|
||||||
sql.Add(' and Workshop=''' + trim(FWorkshop) + ''' ');
|
// sql.Add(' and Workshop=''' + trim(FWorkshop) + ''' ');
|
||||||
sql.Add('and 1=1 ' + WSql);
|
sql.Add('and 1=1 ' + WSql);
|
||||||
sql.Add(') temp_row');
|
sql.Add(') temp_row');
|
||||||
sql.Add(' where rownumber> ' + inttostr(((CurrentPage - 1) * RecordsNumber)));
|
sql.Add(' where rownumber> ' + inttostr(((CurrentPage - 1) * RecordsNumber)));
|
||||||
|
|
@ -242,57 +240,147 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDyeClothOutList.TbDelClick(Sender: TObject);
|
procedure TfrmDyeClothOutList.TbDelClick(Sender: TObject);
|
||||||
var
|
|
||||||
MIOID: string;
|
|
||||||
begin
|
begin
|
||||||
if CDS_1.IsEmpty then
|
|
||||||
Exit;
|
|
||||||
|
|
||||||
if CDS_1.Locate('SSel', True, []) = False then
|
if CDS_1.Locate('ssel', True, []) = False then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
Exit;
|
Exit;
|
||||||
MIOID := '';
|
|
||||||
|
try
|
||||||
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
CDS_1.DisableControls;
|
CDS_1.DisableControls;
|
||||||
with CDS_1 do
|
with CDS_1 do
|
||||||
begin
|
begin
|
||||||
First;
|
First;
|
||||||
while CDS_1.Locate('SSel', True, []) do
|
while not eof do
|
||||||
|
begin
|
||||||
|
if CDS_1.FieldByName('ssel').AsBoolean then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
MIOID := MIOID + ',' + Trim(CDS_1.fieldbyname('IOID').AsString);
|
|
||||||
CDS_1.Delete;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
CDS_1.EnableControls;
|
|
||||||
|
|
||||||
try
|
|
||||||
ADOQueryCmd.Connection.BeginTrans;
|
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
Sql.Clear;
|
sql.Clear;
|
||||||
Sql.Add('exec P_Dye_Cloth_Out_Del ');
|
sql.add(' insert into Dye_Cloth_IO_Del select * from Dye_Cloth_IO where IOID=''' + trim(CDS_1.fieldbyname('IOID').AsString) + ''' ');
|
||||||
Sql.Add(' @IOIDS=' + quotedstr(MIOID));
|
sql.Add(' update Dye_Cloth_IO_Del Set DelTime=Getdate(),Deler=''' + trim(DName) + ''' where IOID=''' + trim(CDS_1.fieldbyname('IOID').AsString) + ''' ');
|
||||||
Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
|
sql.Add(' delete from Dye_Cloth_IO ');
|
||||||
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
|
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;
|
Open;
|
||||||
end;
|
end;
|
||||||
if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
|
|
||||||
raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
|
|
||||||
ADOQueryCmd.Connection.CommitTrans;
|
|
||||||
|
|
||||||
|
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
|
except
|
||||||
|
CDS_1.EnableControls;
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||||
InitGrid();
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
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);
|
procedure TfrmDyeClothOutList.TbEditClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
|
@ -302,7 +390,7 @@ begin
|
||||||
begin
|
begin
|
||||||
|
|
||||||
FIOID := CDS_1.FieldByName('IOID').AsString;
|
FIOID := CDS_1.FieldByName('IOID').AsString;
|
||||||
|
TBAdd.Visible := False;
|
||||||
FWorkshop := self.FWorkshop;
|
FWorkshop := self.FWorkshop;
|
||||||
if ShowModal = 1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
|
|
@ -343,7 +431,7 @@ begin
|
||||||
with frmDyeClothOutPut do
|
with frmDyeClothOutPut do
|
||||||
begin
|
begin
|
||||||
|
|
||||||
FIOID := '';
|
// FIOID := '';
|
||||||
|
|
||||||
FWorkshop := self.FWorkshop;
|
FWorkshop := self.FWorkshop;
|
||||||
if ShowModal = 1 then
|
if ShowModal = 1 then
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
|
||||||
Height = 508
|
Height = 508
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
ExplicitTop = 44
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
|
@ -139,6 +140,15 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 41
|
Width = 41
|
||||||
end
|
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
|
object v1Column4: TcxGridDBColumn
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Caption = #20986#24211#31867#22411
|
Caption = #20986#24211#31867#22411
|
||||||
|
|
@ -151,18 +161,8 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
|
||||||
#29983#20135#36864#22238
|
#29983#20135#36864#22238
|
||||||
#26399#21021#20837#24211)
|
#26399#21021#20837#24211)
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
|
||||||
Width = 81
|
Width = 81
|
||||||
end
|
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
|
object v1Column2: TcxGridDBColumn
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Caption = #20986#24211#26102#38388
|
Caption = #20986#24211#26102#38388
|
||||||
|
|
@ -176,22 +176,6 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 101
|
Width = 101
|
||||||
end
|
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
|
object v2Column1: TcxGridDBColumn
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Caption = #25104#21697#21697#21517
|
Caption = #25104#21697#21697#21517
|
||||||
|
|
@ -208,13 +192,20 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 99
|
Width = 99
|
||||||
end
|
end
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#22791#27880
|
||||||
|
DataBinding.FieldName = 'IONote'
|
||||||
|
DataBinding.IsNullValueType = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 111
|
||||||
|
end
|
||||||
object v1Column15: TcxGridDBColumn
|
object v1Column15: TcxGridDBColumn
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Caption = #21305#25968
|
Caption = #21305#25968
|
||||||
DataBinding.FieldName = 'Piece'
|
DataBinding.FieldName = 'Piece'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 65
|
Width = 106
|
||||||
end
|
end
|
||||||
object v2Column6: TcxGridDBColumn
|
object v2Column6: TcxGridDBColumn
|
||||||
Tag = 2
|
Tag = 2
|
||||||
|
|
@ -223,16 +214,24 @@ inherited frmDyeClothOutPut: TfrmDyeClothOutPut
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
PropertiesClassName = 'TcxTextEditProperties'
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 85
|
Width = 106
|
||||||
end
|
end
|
||||||
object v1Column13: TcxGridDBColumn
|
object v1Column6: TcxGridDBColumn
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Caption = #25104#21697#38376#24133
|
Caption = #20986#24211#21333#21495
|
||||||
DataBinding.FieldName = 'C_Width'
|
DataBinding.FieldName = 'IOID'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
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
|
||||||
end
|
end
|
||||||
object cxGrid2Level1: TcxGridLevel
|
object cxGrid2Level1: TcxGridLevel
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,12 @@ type
|
||||||
v1Column2: TcxGridDBColumn;
|
v1Column2: TcxGridDBColumn;
|
||||||
v1Column4: TcxGridDBColumn;
|
v1Column4: TcxGridDBColumn;
|
||||||
Tv1OrderNo: TcxGridDBColumn;
|
Tv1OrderNo: TcxGridDBColumn;
|
||||||
Tv1Column4: TcxGridDBColumn;
|
|
||||||
v2Column1: TcxGridDBColumn;
|
v2Column1: TcxGridDBColumn;
|
||||||
v2Column6: TcxGridDBColumn;
|
v2Column6: TcxGridDBColumn;
|
||||||
v1Column15: TcxGridDBColumn;
|
v1Column15: TcxGridDBColumn;
|
||||||
v1Column13: TcxGridDBColumn;
|
|
||||||
cxGrid2Level1: TcxGridLevel;
|
cxGrid2Level1: TcxGridLevel;
|
||||||
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure TBAddClick(Sender: TObject);
|
procedure TBAddClick(Sender: TObject);
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
|
@ -94,14 +94,13 @@ begin
|
||||||
begin
|
begin
|
||||||
Append;
|
Append;
|
||||||
FieldByName('IOTime').Value := Trim(FormatDateTime('yyyy-MM-dd hh:mm:ss', SGetServerDateTime(ADOQueryCmd)));
|
FieldByName('IOTime').Value := Trim(FormatDateTime('yyyy-MM-dd hh:mm:ss', SGetServerDateTime(ADOQueryCmd)));
|
||||||
FieldByName('STKID').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('BCIOID').Value;
|
// FieldByName('STKID').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('BCIOID').Value;
|
||||||
FieldByName('IOType').Value := '加工出库';
|
FieldByName('IOType').Value := '加工出库';
|
||||||
FieldByName('IONO').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('OrderNo').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('Piece').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('StkPiece').Value;
|
||||||
FieldByName('Meter').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('StkMeter').Value;
|
FieldByName('Meter').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('StkMeter').Value;
|
||||||
FieldByName('C_Width').Value := frmDyeClothStkSel.CDS_Main.fieldbyname('C_Width').Value;
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
frmDyeClothStkSel.CDS_Main.Delete;
|
frmDyeClothStkSel.CDS_Main.Delete;
|
||||||
|
|
@ -173,6 +172,8 @@ begin
|
||||||
FieldByName('IONo').Value := CDS_Sub.FieldByName('IONo').asString;
|
FieldByName('IONo').Value := CDS_Sub.FieldByName('IONo').asString;
|
||||||
FieldByName('IOTime').Value := CDS_Sub.FieldByName('IOTime').asString;
|
FieldByName('IOTime').Value := CDS_Sub.FieldByName('IOTime').asString;
|
||||||
FieldByName('IOType').Value := CDS_Sub.FieldByName('IOType').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('Meter').Value := CDS_Sub.FieldByName('Meter').asString;
|
||||||
FieldByName('Piece').Value := CDS_Sub.FieldByName('Piece').asString;
|
FieldByName('Piece').Value := CDS_Sub.FieldByName('Piece').asString;
|
||||||
|
|
||||||
|
|
@ -180,20 +181,22 @@ begin
|
||||||
FieldByName('IOQtyFlag').Value := -1;
|
FieldByName('IOQtyFlag').Value := -1;
|
||||||
Post;
|
Post;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
/////////////////////整理库存////////////////
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
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('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.IONO=Dye_Cloth_Stock.OrderNo )');
|
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 OrderNo=''' + Trim(CDS_Sub.fieldbyname('IONO').AsString) + '''');
|
sql.Add('where StkID =''' + Trim(CDS_Sub.FieldByName('StkId').asString) + ''' ');
|
||||||
ExecSQL;
|
ExecSQL;
|
||||||
end;
|
end;
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
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;
|
Open;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -214,7 +217,7 @@ begin
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
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;
|
Open;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -234,6 +237,7 @@ begin
|
||||||
ADOQueryCmd.Connection.CommitTrans;
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
Result := True;
|
Result := True;
|
||||||
except
|
except
|
||||||
|
CDS_Sub.EnableControls;
|
||||||
Result := False;
|
Result := False;
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||||
|
|
@ -247,8 +251,7 @@ begin
|
||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDyeClothOutPut.FormKeyDown(Sender: TObject; var Key: Word;
|
procedure TfrmDyeClothOutPut.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
Shift: TShiftState);
|
|
||||||
begin
|
begin
|
||||||
if Key = VK_ESCAPE then // VK_ESCAPE 是 ESC 键的常量
|
if Key = VK_ESCAPE then // VK_ESCAPE 是 ESC 键的常量
|
||||||
begin
|
begin
|
||||||
|
|
@ -268,7 +271,7 @@ begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' select A.* ');
|
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) + '''');
|
sql.Add(' where IOID=''' + Trim(FIOID) + '''');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
|
|
@ -281,43 +284,42 @@ end;
|
||||||
|
|
||||||
procedure TfrmDyeClothOutPut.TBDelClick(Sender: TObject);
|
procedure TfrmDyeClothOutPut.TBDelClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CDS_Sub.IsEmpty then
|
// if CDS_Sub.IsEmpty then
|
||||||
Exit;
|
// Exit;
|
||||||
if Trim(CDS_Sub.fieldbyname('IOID').AsString) <> '' then
|
// 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
|
// begin
|
||||||
// Close;
|
// if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
|
||||||
// Sql.Clear;
|
// Exit;
|
||||||
// Sql.Add('exec P_BS_Cloth_Out_Del ');
|
//
|
||||||
// Sql.Add(' @BCIOIDS=' + quotedstr(Trim(CDS_Sub.fieldbyname('BCIOID').AsString)));
|
// try
|
||||||
// Sql.Add(',@DCode=' + quotedstr(Trim(DCode)));
|
// ADOQueryCmd.Connection.BeginTrans;
|
||||||
// Sql.Add(',@DName=' + quotedstr(Trim(DName)));
|
//// with ADOQueryCmd do
|
||||||
// Open;
|
//// 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;
|
||||||
// if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
|
// end
|
||||||
// raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
|
// else
|
||||||
|
|
||||||
ADOQueryCmd.Connection.CommitTrans;
|
|
||||||
CDS_Sub.Delete;
|
|
||||||
except
|
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
|
||||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
|
||||||
end;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
CDS_Sub.Delete;
|
CDS_Sub.Delete;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmDyeClothOutPut.TBSaveClick(Sender: TObject);
|
procedure TfrmDyeClothOutPut.TBSaveClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
|
||||||
if CDS_Sub.IsEmpty then
|
if CDS_Sub.IsEmpty then
|
||||||
Exit;
|
Exit;
|
||||||
if CDS_Sub.Locate('IOTime', null, []) = True then
|
if CDS_Sub.Locate('IOTime', null, []) = True then
|
||||||
|
|
|
||||||
|
|
@ -87,15 +87,8 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
Color = clWhite
|
Color = clWhite
|
||||||
ParentBackground = False
|
ParentBackground = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Label2: TLabel
|
|
||||||
Left = 70
|
|
||||||
Top = 36
|
|
||||||
Width = 12
|
|
||||||
Height = 12
|
|
||||||
Caption = #33267
|
|
||||||
end
|
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 195
|
Left = 49
|
||||||
Top = 10
|
Top = 10
|
||||||
Width = 52
|
Width = 52
|
||||||
Height = 12
|
Height = 12
|
||||||
|
|
@ -109,7 +102,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label7: TLabel
|
object Label7: TLabel
|
||||||
Left = 388
|
Left = 242
|
||||||
Top = 10
|
Top = 10
|
||||||
Width = 26
|
Width = 26
|
||||||
Height = 12
|
Height = 12
|
||||||
|
|
@ -123,7 +116,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label10: TLabel
|
object Label10: TLabel
|
||||||
Left = 545
|
Left = 399
|
||||||
Top = 36
|
Top = 36
|
||||||
Width = 39
|
Width = 39
|
||||||
Height = 12
|
Height = 12
|
||||||
|
|
@ -137,7 +130,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label5: TLabel
|
object Label5: TLabel
|
||||||
Left = 374
|
Left = 228
|
||||||
Top = 36
|
Top = 36
|
||||||
Width = 39
|
Width = 39
|
||||||
Height = 12
|
Height = 12
|
||||||
|
|
@ -151,7 +144,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object lbl1: TLabel
|
object lbl1: TLabel
|
||||||
Left = 558
|
Left = 412
|
||||||
Top = 10
|
Top = 10
|
||||||
Width = 26
|
Width = 26
|
||||||
Height = 12
|
Height = 12
|
||||||
|
|
@ -165,7 +158,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object Label23: TLabel
|
object Label23: TLabel
|
||||||
Left = 195
|
Left = 49
|
||||||
Top = 36
|
Top = 36
|
||||||
Width = 52
|
Width = 52
|
||||||
Height = 12
|
Height = 12
|
||||||
|
|
@ -178,24 +171,6 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
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
|
object begtime: TDateTimePicker
|
||||||
Left = 137
|
Left = 137
|
||||||
Top = 132
|
Top = 132
|
||||||
|
|
@ -205,7 +180,7 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
Format = 'HH:mm'
|
Format = 'HH:mm'
|
||||||
Time = 39780.000000000000000000
|
Time = 39780.000000000000000000
|
||||||
Kind = dtkTime
|
Kind = dtkTime
|
||||||
TabOrder = 3
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object endTime: TDateTimePicker
|
object endTime: TDateTimePicker
|
||||||
Left = 137
|
Left = 137
|
||||||
|
|
@ -216,25 +191,41 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
Format = 'HH:mm'
|
Format = 'HH:mm'
|
||||||
Time = 0.999317129630071600
|
Time = 0.999317129630071600
|
||||||
Kind = dtkTime
|
Kind = dtkTime
|
||||||
TabOrder = 4
|
TabOrder = 1
|
||||||
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
|
|
||||||
end
|
end
|
||||||
object OrderNo: TEdit
|
object OrderNo: TEdit
|
||||||
Tag = 2
|
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
|
Top = 6
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -242,19 +233,19 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
OnKeyPress = orderNoKeyPress
|
OnKeyPress = orderNoKeyPress
|
||||||
end
|
end
|
||||||
object STKID: TEdit
|
object PCId: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 590
|
Left = 444
|
||||||
Top = 32
|
Top = 6
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
Hint = '1'
|
Hint = '0'
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
OnKeyPress = orderNoKeyPress
|
OnKeyPress = orderNoKeyPress
|
||||||
end
|
end
|
||||||
object C_Name: TEdit
|
object C_Code: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 419
|
Left = 107
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
|
|
@ -262,36 +253,6 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
OnKeyPress = orderNoKeyPress
|
OnKeyPress = orderNoKeyPress
|
||||||
end
|
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
|
end
|
||||||
object Panel6: TPanel [2]
|
object Panel6: TPanel [2]
|
||||||
Left = 0
|
Left = 0
|
||||||
|
|
@ -395,32 +356,12 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
'10000')
|
'10000')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object cxPageControl1: TcxPageControl [3]
|
object cxGrid1: TcxGrid [3]
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 132
|
Top = 132
|
||||||
Width = 1540
|
Width = 1540
|
||||||
Height = 468
|
Height = 468
|
||||||
Align = alClient
|
Align = alClient
|
||||||
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
|
BorderStyle = cxcbsNone
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
|
|
@ -429,11 +370,11 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
Font.Style = []
|
Font.Style = []
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
PopupMenu = PM_1
|
PopupMenu = PM_1
|
||||||
TabOrder = 0
|
TabOrder = 3
|
||||||
|
ExplicitTop = 133
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
OnFocusedRecordChanged = Tv1FocusedRecordChanged
|
|
||||||
DataController.DataSource = DS_1
|
DataController.DataSource = DS_1
|
||||||
DataController.Filter.AutoDataSetFilter = True
|
DataController.Filter.AutoDataSetFilter = True
|
||||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
|
|
@ -509,37 +450,21 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
Width = 66
|
Width = 66
|
||||||
end
|
end
|
||||||
object v1Column1: TcxGridDBColumn
|
object v1Column1: TcxGridDBColumn
|
||||||
Caption = #35745#21010#21333#21495
|
Caption = #29983#20135#35746#21333#21495
|
||||||
DataBinding.FieldName = 'IONO'
|
DataBinding.FieldName = 'OrderNo'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 98
|
Width = 98
|
||||||
end
|
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
|
object v1Column13: TcxGridDBColumn
|
||||||
Caption = #20135#21697#21517#31216
|
Caption = #25104#21697#21517#31216
|
||||||
DataBinding.FieldName = 'C_Name'
|
DataBinding.FieldName = 'C_Name'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 94
|
Width = 94
|
||||||
end
|
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
|
object v1Column10: TcxGridDBColumn
|
||||||
Caption = #24211#23384#31859#25968
|
Caption = #24211#23384#31859#25968
|
||||||
DataBinding.FieldName = 'StkMeter'
|
DataBinding.FieldName = 'StkMeter'
|
||||||
|
|
@ -557,254 +482,41 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
Width = 80
|
Width = 80
|
||||||
end
|
end
|
||||||
object v1Column12: TcxGridDBColumn
|
object v1Column12: TcxGridDBColumn
|
||||||
Caption = #21697#36136
|
Caption = #26448#36136
|
||||||
DataBinding.FieldName = 'Grade'
|
DataBinding.FieldName = 'Material'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 66
|
Width = 105
|
||||||
end
|
end
|
||||||
object v1Column3: TcxGridDBColumn
|
object v1Column3: TcxGridDBColumn
|
||||||
Caption = #38376#24133
|
Caption = #20837#24211#31867#22411
|
||||||
DataBinding.FieldName = 'C_Width'
|
DataBinding.FieldName = 'IOType'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 66
|
Width = 106
|
||||||
end
|
end
|
||||||
object v1Column5: TcxGridDBColumn
|
object v1Column5: TcxGridDBColumn
|
||||||
Caption = #20811#37325
|
Caption = #25104#21697#22791#27880
|
||||||
DataBinding.FieldName = 'C_GramWeight'
|
DataBinding.FieldName = 'IONote'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 66
|
Width = 107
|
||||||
end
|
end
|
||||||
object Tv1Column1: TcxGridDBColumn
|
object Tv1Column1: TcxGridDBColumn
|
||||||
Caption = #21518#25972#29702#25551#36848
|
Caption = #25104#21697#21518#25972#29702#25551#36848
|
||||||
DataBinding.FieldName = 'finishDescription'
|
DataBinding.FieldName = 'finishDescription'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 80
|
Width = 141
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
end
|
end
|
||||||
end
|
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
|
|
||||||
end
|
|
||||||
end
|
|
||||||
inherited ADOQueryBaseCmd: TADOQuery
|
inherited ADOQueryBaseCmd: TADOQuery
|
||||||
Connection = DataLink_DyeClothStk.ADOLink
|
Connection = DataLink_DyeClothStk.ADOLink
|
||||||
Left = 553
|
Left = 553
|
||||||
|
|
@ -872,7 +584,6 @@ inherited frmDyeClothStkList: TfrmDyeClothStkList
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GPM2: TcxGridPopupMenu
|
object GPM2: TcxGridPopupMenu
|
||||||
Grid = cxGrid2
|
|
||||||
PopupMenus = <>
|
PopupMenus = <>
|
||||||
Left = 736
|
Left = 736
|
||||||
Top = 280
|
Top = 280
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,9 @@ type
|
||||||
ADOQueryTemp: TADOQuery;
|
ADOQueryTemp: TADOQuery;
|
||||||
DS_1: TDataSource;
|
DS_1: TDataSource;
|
||||||
GPM_1: TcxGridPopupMenu;
|
GPM_1: TcxGridPopupMenu;
|
||||||
Label2: TLabel;
|
|
||||||
BegDate: TDateTimePicker;
|
|
||||||
EndDate: TDateTimePicker;
|
|
||||||
CDS_1: TClientDataSet;
|
CDS_1: TClientDataSet;
|
||||||
begtime: TDateTimePicker;
|
begtime: TDateTimePicker;
|
||||||
endTime: TDateTimePicker;
|
endTime: TDateTimePicker;
|
||||||
IsJYTime: TCheckBox;
|
|
||||||
ToolButton2: TToolButton;
|
ToolButton2: TToolButton;
|
||||||
ToolButton4: TToolButton;
|
ToolButton4: TToolButton;
|
||||||
Panel6: TPanel;
|
Panel6: TPanel;
|
||||||
|
|
@ -57,45 +53,22 @@ type
|
||||||
PM_1: TPopupMenu;
|
PM_1: TPopupMenu;
|
||||||
PM11: TMenuItem;
|
PM11: TMenuItem;
|
||||||
N1: TMenuItem;
|
N1: TMenuItem;
|
||||||
cxPageControl1: TcxPageControl;
|
GPM2: TcxGridPopupMenu;
|
||||||
cxTabSheet1: TcxTabSheet;
|
CDS_2: TClientDataSet;
|
||||||
cxTabSheet2: TcxTabSheet;
|
DS_2: TDataSource;
|
||||||
|
N2: TMenuItem;
|
||||||
cxGrid1: TcxGrid;
|
cxGrid1: TcxGrid;
|
||||||
Tv1: TcxGridDBTableView;
|
Tv1: TcxGridDBTableView;
|
||||||
v1Column22: TcxGridDBColumn;
|
v1Column22: TcxGridDBColumn;
|
||||||
v1Column1: TcxGridDBColumn;
|
v1Column1: TcxGridDBColumn;
|
||||||
Tv1Column4: TcxGridDBColumn;
|
|
||||||
v1Column13: TcxGridDBColumn;
|
v1Column13: TcxGridDBColumn;
|
||||||
v1Column4: TcxGridDBColumn;
|
|
||||||
v1Column10: TcxGridDBColumn;
|
v1Column10: TcxGridDBColumn;
|
||||||
Tv1Column10: TcxGridDBColumn;
|
Tv1Column10: TcxGridDBColumn;
|
||||||
v1Column12: TcxGridDBColumn;
|
v1Column12: TcxGridDBColumn;
|
||||||
v1Column3: TcxGridDBColumn;
|
v1Column3: TcxGridDBColumn;
|
||||||
v1Column5: 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;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
cxGrid1Level1: TcxGridLevel;
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure TBRafreshClick(Sender: TObject);
|
procedure TBRafreshClick(Sender: TObject);
|
||||||
|
|
@ -115,9 +88,6 @@ type
|
||||||
procedure ToolButton4Click(Sender: TObject);
|
procedure ToolButton4Click(Sender: TObject);
|
||||||
procedure PM11Click(Sender: TObject);
|
procedure PM11Click(Sender: TObject);
|
||||||
procedure N1Click(Sender: TObject);
|
procedure N1Click(Sender: TObject);
|
||||||
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
|
|
||||||
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
|
|
||||||
ANewItemRecordFocusingChanged: Boolean);
|
|
||||||
procedure N2Click(Sender: TObject);
|
procedure N2Click(Sender: TObject);
|
||||||
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
|
|
||||||
|
|
@ -126,7 +96,6 @@ type
|
||||||
lstCust: TStringList;
|
lstCust: TStringList;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
procedure SetStatus();
|
procedure SetStatus();
|
||||||
procedure InitSubGrid();
|
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
public
|
public
|
||||||
canshu1, FWorkshop: string;
|
canshu1, FWorkshop: string;
|
||||||
|
|
@ -156,8 +125,6 @@ procedure TfrmDyeClothStkList.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
lstCust := TStringList.Create;
|
lstCust := TStringList.Create;
|
||||||
EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
|
||||||
BegDate.DateTime := EndDate.DateTime - 20;
|
|
||||||
FWorkshop := trim(Self.fParameters3);
|
FWorkshop := trim(Self.fParameters3);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -179,11 +146,7 @@ begin
|
||||||
WSql := SGetFilters(Panel1, 1, 2);
|
WSql := SGetFilters(Panel1, 1, 2);
|
||||||
if Trim(WSql) <> '' then
|
if Trim(WSql) <> '' then
|
||||||
WSql := ' and ' + WSql;
|
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
|
try
|
||||||
ADOQueryMain.DisableControls;
|
ADOQueryMain.DisableControls;
|
||||||
|
|
@ -195,7 +158,7 @@ begin
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' select top ' + inttostr(RecordsNumber) + ' * ');
|
sql.Add(' select top ' + inttostr(RecordsNumber) + ' * ');
|
||||||
sql.Add(' from ');
|
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(',COUNT(1) OVER() AS TotalCount');
|
||||||
sql.Add(',* from V_Dye_Cloth_Stk AA where 1=1 ');
|
sql.Add(',* from V_Dye_Cloth_Stk AA where 1=1 ');
|
||||||
if trim(FWorkshop) <> '' then
|
if trim(FWorkshop) <> '' then
|
||||||
|
|
@ -219,30 +182,6 @@ begin
|
||||||
end;
|
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);
|
procedure TfrmDyeClothStkList.TBRafreshClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
CurrentPage := 1;
|
CurrentPage := 1;
|
||||||
|
|
@ -276,15 +215,13 @@ begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, '成品库存列表');
|
ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, '成品库存列表');
|
||||||
ReadCxGrid(trim(self.Caption) + 'Tv2', Tv2, '³ÉÆ·¿â´æÁбí');
|
|
||||||
CurrentPage := 1;
|
CurrentPage := 1;
|
||||||
RecordsNumber := 500;
|
RecordsNumber := 500;
|
||||||
canshu1 := Trim(Self.fParameters1);
|
canshu1 := Trim(Self.fParameters1);
|
||||||
InitGrid();
|
InitGrid();
|
||||||
|
|
||||||
SetStatus();
|
SetStatus();
|
||||||
v1Column4.Visible := false;
|
|
||||||
v1Column4.Hidden := true;
|
|
||||||
KeyPreview := True; // 确保表单可以预览按键
|
KeyPreview := True; // 确保表单可以预览按键
|
||||||
end;
|
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);
|
procedure TfrmDyeClothStkList.Tv1TcxGridDBDataControllerTcxDataSummaryFooterSummaryItems6GetText(Sender: TcxDataSummaryItem; const AValue: Variant; AIsFooter: Boolean; var AText: string);
|
||||||
begin
|
begin
|
||||||
if lstCust <> nil then
|
if lstCust <> nil then
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
|
||||||
Left = 105
|
Left = 105
|
||||||
Top = 131
|
Top = 131
|
||||||
Caption = #24211#23384#36873#25321#21015#34920
|
Caption = #24211#23384#36873#25321#21015#34920
|
||||||
ClientHeight = 550
|
ClientHeight = 545
|
||||||
ClientWidth = 1165
|
ClientWidth = 1138
|
||||||
Color = clWhite
|
Color = clWhite
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Height = -12
|
Font.Height = -12
|
||||||
|
|
@ -11,15 +11,15 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
|
||||||
Position = poMainFormCenter
|
Position = poMainFormCenter
|
||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnKeyDown = FormKeyDown
|
OnKeyDown = FormKeyDown
|
||||||
ExplicitWidth = 1181
|
ExplicitWidth = 1154
|
||||||
ExplicitHeight = 589
|
ExplicitHeight = 584
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 12
|
TextHeight = 12
|
||||||
object ToolBar1: TToolBar [0]
|
object ToolBar1: TToolBar [0]
|
||||||
Tag = 1
|
Tag = 1
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1165
|
Width = 1138
|
||||||
Height = 38
|
Height = 38
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonHeight = 38
|
ButtonHeight = 38
|
||||||
|
|
@ -82,7 +82,7 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
|
||||||
object Panel1: TPanel [1]
|
object Panel1: TPanel [1]
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 38
|
Top = 38
|
||||||
Width = 1165
|
Width = 1138
|
||||||
Height = 36
|
Height = 36
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -91,24 +91,24 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
|
||||||
ParentBackground = False
|
ParentBackground = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 162
|
Left = 230
|
||||||
Top = 11
|
Top = 11
|
||||||
Width = 24
|
Width = 48
|
||||||
Height = 12
|
Height = 12
|
||||||
Caption = #21697#21517
|
Caption = #25104#21697#21517#31216
|
||||||
end
|
end
|
||||||
object Label5: TLabel
|
object Label5: TLabel
|
||||||
Left = 23
|
Left = 23
|
||||||
Top = 10
|
Top = 10
|
||||||
Width = 48
|
Width = 60
|
||||||
Height = 12
|
Height = 12
|
||||||
Caption = #35745#21010#21333#21495
|
Caption = #29983#20135#35746#21333#21495
|
||||||
end
|
end
|
||||||
object C_name: TEdit
|
object C_name: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 192
|
Left = 284
|
||||||
Top = 7
|
Top = 6
|
||||||
Width = 100
|
Width = 119
|
||||||
Height = 20
|
Height = 20
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnChange = TBFindClick
|
OnChange = TBFindClick
|
||||||
|
|
@ -116,9 +116,9 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
|
||||||
end
|
end
|
||||||
object OrderNo: TEdit
|
object OrderNo: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 71
|
Left = 83
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 78
|
Width = 102
|
||||||
Height = 20
|
Height = 20
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnKeyPress = OrderNoKeyPress
|
OnKeyPress = OrderNoKeyPress
|
||||||
|
|
@ -127,11 +127,12 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
|
||||||
object cxGrid2: TcxGrid [2]
|
object cxGrid2: TcxGrid [2]
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 74
|
Top = 74
|
||||||
Width = 1165
|
Width = 1138
|
||||||
Height = 476
|
Height = 471
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
ExplicitTop = 70
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
OnDblClick = Tv1DblClick
|
OnDblClick = Tv1DblClick
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
|
@ -198,7 +199,7 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
|
||||||
DataBinding.FieldName = 'C_Name'
|
DataBinding.FieldName = 'C_Name'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 81
|
Width = 88
|
||||||
end
|
end
|
||||||
object v2Column1: TcxGridDBColumn
|
object v2Column1: TcxGridDBColumn
|
||||||
Tag = 2
|
Tag = 2
|
||||||
|
|
@ -218,36 +219,36 @@ inherited frmDyeClothStkSel: TfrmDyeClothStkSel
|
||||||
end
|
end
|
||||||
object v2Column6: TcxGridDBColumn
|
object v2Column6: TcxGridDBColumn
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Caption = #25968#37327
|
Caption = #24211#23384#25968#37327
|
||||||
DataBinding.FieldName = 'StkMeter'
|
DataBinding.FieldName = 'StkMeter'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
PropertiesClassName = 'TcxTextEditProperties'
|
PropertiesClassName = 'TcxTextEditProperties'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 85
|
Width = 95
|
||||||
end
|
end
|
||||||
object v1Column15: TcxGridDBColumn
|
object v1Column15: TcxGridDBColumn
|
||||||
Caption = #21305#25968
|
Caption = #24211#23384#21305#25968
|
||||||
DataBinding.FieldName = 'StkPiece'
|
DataBinding.FieldName = 'StkPiece'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 65
|
Width = 97
|
||||||
end
|
end
|
||||||
object v1Column13: TcxGridDBColumn
|
object v1Column13: TcxGridDBColumn
|
||||||
Caption = #25104#21697#38376#24133
|
Caption = #25104#21697#20837#24211#31867#22411
|
||||||
DataBinding.FieldName = 'C_Width'
|
DataBinding.FieldName = 'IOType'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 79
|
Width = 124
|
||||||
end
|
end
|
||||||
object Tv1Grade: TcxGridDBColumn
|
object Tv1Grade: TcxGridDBColumn
|
||||||
Caption = #31561#32423
|
Caption = #25104#21697#22791#27880
|
||||||
DataBinding.FieldName = 'Grade'
|
DataBinding.FieldName = 'IONote'
|
||||||
DataBinding.IsNullValueType = True
|
DataBinding.IsNullValueType = True
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 80
|
Width = 136
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object cxGrid2Level1: TcxGridLevel
|
object cxGrid2Level1: TcxGridLevel
|
||||||
|
|
|
||||||
|
|
@ -125,8 +125,9 @@ begin
|
||||||
Filtered := False;
|
Filtered := False;
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' select A.* ');
|
sql.Add(' select B.C_Name,A.* ');
|
||||||
sql.Add(' from Dye_Cloth_Stock 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(' where A.StkExists=1 ');
|
||||||
SQL.Add(' and (A.StkMeter>0 or A.StkPiece>0) ');
|
SQL.Add(' and (A.StkMeter>0 or A.StkPiece>0) ');
|
||||||
Open;
|
Open;
|
||||||
|
|
|
||||||
391
F06染色成品仓库/U_DyePlanForCardSel.dfm
Normal file
391
F06染色成品仓库/U_DyePlanForCardSel.dfm
Normal file
|
|
@ -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
|
||||||
253
F06染色成品仓库/U_DyePlanForCardSel.pas
Normal file
253
F06染色成品仓库/U_DyePlanForCardSel.pas
Normal file
|
|
@ -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.
|
||||||
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user