0
This commit is contained in:
parent
8abc951906
commit
10b200efae
|
@ -22,7 +22,8 @@ uses
|
|||
U_DataLink in 'U_DataLink.pas' {DataLink_DyeProcess: TDataModule},
|
||||
U_DyePCList in 'U_DyePCList.pas' {frmDyePCList},
|
||||
U_DyeOutput in 'U_DyeOutput.pas' {frmDyeOutput},
|
||||
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas';
|
||||
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
|
||||
U_MachTaskList in 'U_MachTaskList.pas' {frmMachTaskList};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
|
|
|
@ -127,6 +127,10 @@
|
|||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
|
||||
<DCCReference Include="U_MachTaskList.pas">
|
||||
<Form>frmMachTaskList</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
|
|
|
@ -1,27 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<Transactions>
|
||||
<Transaction>1899/12/30 00:00:00.000.963,=D:\Dp10Repo\项目代码\RTBasics\F04染色刷卡\U_DyeOutputList.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.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.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.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas=</Transaction>
|
||||
<Transaction>1899/12/30 00:00:00.000.788,D:\Dp10Repo\项目代码\D10sxYilanbuyi\F04染色刷卡\U_DyeOutputList.dfm=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F04染色刷卡\U_DyePCList.dfm</Transaction>
|
||||
<Transaction>1899/12/30 00:00:00.000.138,=D:\Dp10Repo\项目代码\RTBasics\F04染色刷卡\U_DyeOutput.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.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas</Transaction>
|
||||
<Transaction>1899/12/30 00:00:00.000.811,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.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.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas</Transaction>
|
||||
<Transaction>1899/12/30 00:00:00.000.326,D:\Dp10Repo\项目代码\RTBasics\F04染色刷卡\InformationBase.dproj=D:\Dp10Repo\项目代码\RTBasics\F04染色刷卡\DyeProcess.dproj</Transaction>
|
||||
<Transaction>1899/12/30 00:00:00.000.998,D:\Dp10Repo\项目代码\RTBasics\F04染色刷卡\Unit1.pas=</Transaction>
|
||||
<Transaction>1899/12/30 00:00:00.000.788,D:\Dp10Repo\项目代码\D10sxYilanbuyi\F04染色刷卡\U_DyeOutputList.pas=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F04染色刷卡\U_DyePCList.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.048,=D:\Dp10Repo\public10\design\U_BaseList.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.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.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.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.734,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.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.178,=D:\Dp10Repo\public10\design\U_WindowFormdesign.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.138,=D:\Dp10Repo\项目代码\RTBasics\F04染色刷卡\U_DyeOutput.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.811,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.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.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.963,=D:\Dp10Repo\项目代码\RTBasics\F04染色刷卡\U_DyeOutputList.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.015,=D:\Dp10Repo\public10\ThreeFun\Fun\U_RTFun.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.788,D:\Dp10Repo\项目代码\D10sxYilanbuyi\F04染色刷卡\U_DyePCList.pas=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F04染色刷卡\U_DyeOutputList.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.998,D:\Dp10Repo\项目代码\RTBasics\F04染色刷卡\Unit1.pas=</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.788,D:\Dp10Repo\项目代码\D10sxYilanbuyi\F04染色刷卡\U_DyePCList.dfm=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F04染色刷卡\U_DyeOutputList.dfm</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.086,=D:\Dp10Repo\public10\design\U_cxGridCustomCss.pas</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.326,D:\Dp10Repo\项目代码\RTBasics\F04染色刷卡\DyeProcess.dproj=D:\Dp10Repo\项目代码\RTBasics\F04染色刷卡\InformationBase.dproj</Transaction>
|
||||
<Transaction>1899-12-30 00:00:00.000.123,=D:\Dp10Repo\public10\design\U_globalVar.pas</Transaction>
|
||||
<Transaction>2025-09-11 15:02:11.620,=D:\Dp10Repo\项目代码\D10sxYilanbuyi\F04染色刷卡\U_MachTaskList.pas</Transaction>
|
||||
</Transactions>
|
||||
<ProjectSortOrder AutoSort="0" SortType="0">
|
||||
<File Path="..\..\D10sxYilanbuyi"/>
|
||||
|
@ -56,5 +57,7 @@
|
|||
<File Path="U_DyeOutput.dfm"/>
|
||||
<File Path="U_DyePCList.pas"/>
|
||||
<File Path="U_DyePCList.dfm"/>
|
||||
<File Path="U_MachTaskList.pas"/>
|
||||
<File Path="U_MachTaskList.dfm"/>
|
||||
</ProjectSortOrder>
|
||||
</BorlandProject>
|
||||
|
|
Binary file not shown.
|
@ -20,7 +20,7 @@ inherited frmDyePCList: TfrmDyePCList
|
|||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 97
|
||||
ButtonWidth = 96
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
DisabledImages = DataLink_DyeProcess.ImageList_new32
|
||||
|
@ -59,16 +59,24 @@ inherited frmDyePCList: TfrmDyePCList
|
|||
ImageIndex = 21
|
||||
Visible = False
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
object ToolButton2: TToolButton
|
||||
Left = 213
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #25195#25551#25490#32568
|
||||
ImageIndex = 2
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 308
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986'Excel'
|
||||
ImageIndex = 20
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 314
|
||||
Left = 408
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
|
@ -76,7 +84,7 @@ inherited frmDyePCList: TfrmDyePCList
|
|||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 409
|
||||
Left = 503
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
@ -94,47 +102,14 @@ inherited frmDyePCList: TfrmDyePCList
|
|||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
object Label3: TLabel
|
||||
Left = 252
|
||||
Top = 36
|
||||
Left = 21
|
||||
Top = 20
|
||||
Width = 48
|
||||
Height = 13
|
||||
Caption = #27969#31243#21345#21495
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 24
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 13
|
||||
Caption = #21047#21345#26085#26399
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 64
|
||||
Top = 36
|
||||
Width = 12
|
||||
Height = 13
|
||||
Caption = #33267
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 252
|
||||
Top = 12
|
||||
Width = 48
|
||||
Height = 13
|
||||
Caption = #35745#21010#21333#21495
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 504
|
||||
Top = 36
|
||||
Width = 3
|
||||
Height = 13
|
||||
end
|
||||
object Label16: TLabel
|
||||
Left = 576
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 13
|
||||
Caption = #24037#24207
|
||||
end
|
||||
object Label13: TLabel
|
||||
Left = 288
|
||||
Top = 128
|
||||
|
@ -149,20 +124,6 @@ inherited frmDyePCList: TfrmDyePCList
|
|||
Height = 13
|
||||
Caption = #19994#21153#21592
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 428
|
||||
Top = 12
|
||||
Width = 24
|
||||
Height = 13
|
||||
Caption = #39068#33394
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 428
|
||||
Top = 36
|
||||
Width = 24
|
||||
Height = 13
|
||||
Caption = #33394#21495
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 604
|
||||
Top = 124
|
||||
|
@ -170,56 +131,22 @@ inherited frmDyePCList: TfrmDyePCList
|
|||
Height = 13
|
||||
Caption = #33457#22411#21495
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 576
|
||||
Top = 36
|
||||
Width = 24
|
||||
Height = 13
|
||||
Caption = #29677#32452
|
||||
end
|
||||
object pcid: TEdit
|
||||
Tag = 2
|
||||
Left = 302
|
||||
Top = 32
|
||||
Width = 80
|
||||
Left = 71
|
||||
Top = 16
|
||||
Width = 154
|
||||
Height = 21
|
||||
TabOrder = 0
|
||||
OnChange = pcidChange
|
||||
end
|
||||
object BegDate: TDateTimePicker
|
||||
Left = 73
|
||||
Top = 8
|
||||
Width = 90
|
||||
Height = 20
|
||||
Date = 40768.000000000000000000
|
||||
Time = 0.458268587972270300
|
||||
TabOrder = 1
|
||||
end
|
||||
object EndDate: TDateTimePicker
|
||||
Left = 73
|
||||
Top = 32
|
||||
Width = 90
|
||||
Height = 20
|
||||
Date = 40768.000000000000000000
|
||||
Time = 0.458268587972270300
|
||||
TabOrder = 2
|
||||
end
|
||||
object orderNo: TEdit
|
||||
Tag = 2
|
||||
Left = 302
|
||||
Top = 8
|
||||
Width = 80
|
||||
Height = 21
|
||||
TabOrder = 3
|
||||
OnChange = pcidChange
|
||||
end
|
||||
object customerNoName: TEdit
|
||||
Tag = 2
|
||||
Left = 314
|
||||
Top = 124
|
||||
Width = 100
|
||||
Height = 21
|
||||
TabOrder = 4
|
||||
TabOrder = 1
|
||||
OnChange = pcidChange
|
||||
end
|
||||
object ywy: TEdit
|
||||
|
@ -228,25 +155,7 @@ inherited frmDyePCList: TfrmDyePCList
|
|||
Top = 124
|
||||
Width = 100
|
||||
Height = 21
|
||||
TabOrder = 5
|
||||
OnChange = pcidChange
|
||||
end
|
||||
object C_Color: TEdit
|
||||
Tag = 2
|
||||
Left = 454
|
||||
Top = 8
|
||||
Width = 80
|
||||
Height = 21
|
||||
TabOrder = 6
|
||||
OnChange = pcidChange
|
||||
end
|
||||
object C_ColorNo: TEdit
|
||||
Tag = 2
|
||||
Left = 454
|
||||
Top = 32
|
||||
Width = 80
|
||||
Height = 21
|
||||
TabOrder = 7
|
||||
TabOrder = 2
|
||||
OnChange = pcidChange
|
||||
end
|
||||
object lbHx: TEdit
|
||||
|
@ -255,50 +164,9 @@ inherited frmDyePCList: TfrmDyePCList
|
|||
Top = 120
|
||||
Width = 80
|
||||
Height = 21
|
||||
TabOrder = 8
|
||||
TabOrder = 3
|
||||
OnChange = pcidChange
|
||||
end
|
||||
object GlideName: TComboBox
|
||||
Tag = 2
|
||||
Left = 602
|
||||
Top = 8
|
||||
Width = 80
|
||||
Height = 21
|
||||
Style = csDropDownList
|
||||
TabOrder = 9
|
||||
OnChange = pcidChange
|
||||
end
|
||||
object StaffName: TEdit
|
||||
Tag = 2
|
||||
Left = 602
|
||||
Top = 32
|
||||
Width = 80
|
||||
Height = 21
|
||||
TabOrder = 10
|
||||
OnChange = pcidChange
|
||||
end
|
||||
object begtime: TDateTimePicker
|
||||
Left = 157
|
||||
Top = 8
|
||||
Width = 55
|
||||
Height = 20
|
||||
Date = 39780.000000000000000000
|
||||
Format = 'HH:mm'
|
||||
Time = 39780.000000000000000000
|
||||
Kind = dtkTime
|
||||
TabOrder = 11
|
||||
end
|
||||
object endTime: TDateTimePicker
|
||||
Left = 157
|
||||
Top = 32
|
||||
Width = 55
|
||||
Height = 20
|
||||
Date = 39780.000000000000000000
|
||||
Format = 'HH:mm'
|
||||
Time = 0.999317129630071600
|
||||
Kind = dtkTime
|
||||
TabOrder = 12
|
||||
end
|
||||
end
|
||||
object MovePanel2: TMovePanel [2]
|
||||
Left = 351
|
||||
|
@ -354,7 +222,7 @@ inherited frmDyePCList: TfrmDyePCList
|
|||
end
|
||||
object tv1mcName: TcxGridDBColumn
|
||||
Caption = #26426#32568
|
||||
DataBinding.FieldName = 'mcName'
|
||||
DataBinding.FieldName = 'machNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
FixedKind = fkLeftDynamic
|
||||
HeaderAlignmentHorz = taCenter
|
||||
|
|
|
@ -30,32 +30,15 @@ type
|
|||
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||
Label3: TLabel;
|
||||
pcid: TEdit;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
BegDate: TDateTimePicker;
|
||||
EndDate: TDateTimePicker;
|
||||
CDS_Main: TClientDataSet;
|
||||
Label5: TLabel;
|
||||
orderNo: TEdit;
|
||||
MovePanel2: TMovePanel;
|
||||
Label10: TLabel;
|
||||
RMGridReport1: TRMGridReport;
|
||||
Label16: TLabel;
|
||||
customerNoName: TEdit;
|
||||
Label13: TLabel;
|
||||
ywy: TEdit;
|
||||
Label17: TLabel;
|
||||
C_Color: TEdit;
|
||||
Label4: TLabel;
|
||||
C_ColorNo: TEdit;
|
||||
Label6: TLabel;
|
||||
lbHx: TEdit;
|
||||
Label7: TLabel;
|
||||
GlideName: TComboBox;
|
||||
StaffName: TEdit;
|
||||
Label9: TLabel;
|
||||
begtime: TDateTimePicker;
|
||||
endTime: TDateTimePicker;
|
||||
ToolButton1: TToolButton;
|
||||
dbGrid1: TcxGrid;
|
||||
tv1: TcxGridDBTableView;
|
||||
|
@ -83,6 +66,7 @@ type
|
|||
tv1CurGlideName: TcxGridDBColumn;
|
||||
tv1Note: TcxGridDBColumn;
|
||||
dbGrid1Level1: TcxGridLevel;
|
||||
ToolButton2: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
@ -96,6 +80,7 @@ type
|
|||
procedure PRTColorChange(Sender: TObject);
|
||||
procedure TBdelClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
|
||||
private
|
||||
FLeft, FTop: Integer;
|
||||
|
@ -112,7 +97,7 @@ var
|
|||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_ZDYHelp;
|
||||
U_DataLink, U_RTFun, U_ZDYHelp, U_MachTaskList;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
|
@ -132,44 +117,44 @@ procedure TfrmDyePCList.FormCreate(Sender: TObject);
|
|||
begin
|
||||
inherited;
|
||||
|
||||
EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
BegDate.DateTime := EndDate.DateTime;
|
||||
// EndDate.DateTime := SGetServerDateTime(ADOQueryTemp);
|
||||
// BegDate.DateTime := EndDate.DateTime;
|
||||
fsyrName := trim(DdataBase);
|
||||
canshu1 := trim(DParameters1);
|
||||
SInitComBoxBySql(ADOQueryTemp, GlideName, false, 'select PSName as Name from Dye_Process');
|
||||
// SInitComBoxBySql(ADOQueryTemp, GlideName, false, 'select PSName as Name from Dye_Process');
|
||||
end;
|
||||
|
||||
procedure TfrmDyePCList.InitGrid();
|
||||
var
|
||||
Msql, mbegdate, menddate: string;
|
||||
mBegDate, mendDate: string;
|
||||
mAction: string;
|
||||
rs: _Recordset;
|
||||
r: integer;
|
||||
begin
|
||||
Msql := '';
|
||||
if SGetFilters(Panel1, 1, 2) <> '' then
|
||||
Msql := Msql + ' and ' + SGetFilters(Panel1, 1, 2);
|
||||
mbegdate := FormatDateTime('yyyy-MM-dd', begdate.Date) + ' ' + FormatDateTime('HH:nn', begTime.Time);
|
||||
menddate := FormatDateTime('yyyy-MM-dd', enddate.Date) + ' ' + FormatDateTime('HH:nn', endTime.Time);
|
||||
// ÈÎÎñʱ¼ä
|
||||
|
||||
try
|
||||
tv1.BeginUpdate;
|
||||
ADOQueryMain.DisableControls;
|
||||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
close;
|
||||
filtered := false;
|
||||
sql.Clear;
|
||||
Filtered := False;
|
||||
// sql.Add('select GOID,A.GlideName,Qty,rollnum,groupName,B.*,a.filler as filler2,a.filltime as filltime2,gotime,QtyUnit,StaffName from Dye_Plan_Glide_OutPut A ');
|
||||
sql.Add('select * from V_Dye_Plan_Glide_OutPut A');
|
||||
sql.Add('inner join Dye_Plan_Card B on A.PCID=B.PCID ');
|
||||
sql.add('where A.GOTime>=''' + trim(mbegdate) + ''' ');
|
||||
sql.Add('and A.GOTime<''' + trim(menddate) + ''' ');
|
||||
sql.Add(Msql);
|
||||
// showmessage(sql.Text);
|
||||
sql.Add('exec p_dyemach_pcjklist');
|
||||
// sql.Add('@PCID=' + quotedStr(PCID.text));
|
||||
// sql.Add(',@cust=' + quotedStr(trim(custName.Text)));
|
||||
// sql.Add(',@cpName=' + quotedStr(''));
|
||||
// sql.Add(',@color=' + quotedStr(trim(C_color.Text)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS(ADOQueryMain, CDS_Main);
|
||||
SInitCDSData(ADOQueryMain, CDS_Main);
|
||||
SCreateCDS(ADOQueryMain, CDS_main);
|
||||
SInitCDSData(ADOQueryMain, CDS_main);
|
||||
finally
|
||||
ADOQueryMain.EnableControls;
|
||||
tv1.EndUpdate;
|
||||
// tv1.ApplyBestFit();
|
||||
end;
|
||||
TBFind.Click;
|
||||
end;
|
||||
|
||||
procedure TfrmDyePCList.TBRafreshClick(Sender: TObject);
|
||||
|
@ -185,6 +170,22 @@ begin
|
|||
WriteCxGrid(self.Caption + tv1.Name, Tv1, '³ÉÆ·²Ö¿â');
|
||||
end;
|
||||
|
||||
procedure TfrmDyePCList.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
// if ADOQuerymain.IsEmpty then
|
||||
// exit;
|
||||
|
||||
frmMachTaskList := TfrmMachTaskList.create(self);
|
||||
with frmMachTaskList do
|
||||
begin
|
||||
fcurMachId := trim(self.adoquerymain.FieldByName('mcid').AsString);
|
||||
machName.text := trim(self.adoquerymain.FieldByName('mcName').AsString);
|
||||
showModal;
|
||||
free;
|
||||
end;
|
||||
initgrid();
|
||||
end;
|
||||
|
||||
procedure TfrmDyePCList.ConNoMChange(Sender: TObject);
|
||||
begin
|
||||
if ADOQueryMain.Active then
|
||||
|
|
322
F04染色刷卡/U_MachTaskList.dfm
Normal file
322
F04染色刷卡/U_MachTaskList.dfm
Normal file
|
@ -0,0 +1,322 @@
|
|||
object frmMachTaskList: TfrmMachTaskList
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = #25195#25551#25490#32568
|
||||
ClientHeight = 824
|
||||
ClientWidth = 1271
|
||||
Color = clBtnFace
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
WindowState = wsMaximized
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 21
|
||||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 121
|
||||
Width = 1271
|
||||
Height = 703
|
||||
Align = alClient
|
||||
Images = DataLink_DyeProcess.ThreeImgList
|
||||
TabOrder = 0
|
||||
ExplicitTop = 127
|
||||
object tv1: TcxGridDBTableView
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
ScrollbarAnnotations.CustomAnnotations = <>
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
DataController.Summary.FooterSummaryItems = <
|
||||
item
|
||||
Kind = skSum
|
||||
Column = tv1taskQty
|
||||
end
|
||||
item
|
||||
Kind = skSum
|
||||
Column = tv1taskRollNum
|
||||
end>
|
||||
DataController.Summary.SummaryGroups = <>
|
||||
OptionsCustomize.ColumnFiltering = False
|
||||
OptionsCustomize.ColumnGrouping = False
|
||||
OptionsCustomize.ColumnSorting = False
|
||||
OptionsData.Deleting = False
|
||||
OptionsData.Editing = False
|
||||
OptionsData.Inserting = False
|
||||
OptionsView.ShowEditButtons = gsebForFocusedRecord
|
||||
OptionsView.Footer = True
|
||||
OptionsView.GroupByBox = False
|
||||
OptionsView.HeaderHeight = 30
|
||||
Styles.UseOddEvenStyles = bFalse
|
||||
object tv1OrderNo: TcxGridDBColumn
|
||||
Caption = #35745#21010#21333
|
||||
DataBinding.FieldName = 'OrderNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 74
|
||||
end
|
||||
object tv1custName: TcxGridDBColumn
|
||||
Caption = #23458#25143
|
||||
DataBinding.FieldName = 'custName'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 70
|
||||
end
|
||||
object tv1pcid: TcxGridDBColumn
|
||||
Caption = #27969#31243#21345
|
||||
DataBinding.FieldName = 'pcid'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 115
|
||||
end
|
||||
object tv1C_name: TcxGridDBColumn
|
||||
Caption = #20135#21697#21517#31216
|
||||
DataBinding.FieldName = 'C_name'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 125
|
||||
end
|
||||
object tv1c_color: TcxGridDBColumn
|
||||
Caption = #39068#33394
|
||||
DataBinding.FieldName = 'c_color'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 98
|
||||
end
|
||||
object tv1taskDate: TcxGridDBColumn
|
||||
Caption = #20219#21153#26102#38388
|
||||
DataBinding.FieldName = 'taskDate'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Width = 103
|
||||
end
|
||||
object tv1taskRollNum: TcxGridDBColumn
|
||||
Caption = #21305#25968
|
||||
DataBinding.FieldName = 'taskRollNum'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Options.Editing = False
|
||||
Options.Filtering = False
|
||||
Width = 71
|
||||
end
|
||||
object tv1taskQty: TcxGridDBColumn
|
||||
Caption = #20219#21153#25968#37327
|
||||
DataBinding.FieldName = 'taskQty'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 86
|
||||
end
|
||||
object tv1CarNo: TcxGridDBColumn
|
||||
Caption = #36733#36710#21495
|
||||
DataBinding.FieldName = 'CarNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 81
|
||||
end
|
||||
object tv1Column1: TcxGridDBColumn
|
||||
Caption = #38376#24133
|
||||
DataBinding.FieldName = 'C_Width'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object tv1Column2: TcxGridDBColumn
|
||||
Caption = #20811#37325
|
||||
DataBinding.FieldName = 'C_GramWeight'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object tv1Column3: TcxGridDBColumn
|
||||
Caption = #33394#21495
|
||||
DataBinding.FieldName = 'C_ColorNo'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 80
|
||||
end
|
||||
object tv1Column4: TcxGridDBColumn
|
||||
Caption = #22791#27880
|
||||
DataBinding.FieldName = 'PJNote'
|
||||
DataBinding.IsNullValueType = True
|
||||
HeaderAlignmentHorz = taCenter
|
||||
Width = 139
|
||||
end
|
||||
end
|
||||
object cxGrid1Level1: TcxGridLevel
|
||||
GridView = tv1
|
||||
end
|
||||
end
|
||||
object ToolBar3: TToolBar
|
||||
Tag = 1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 1271
|
||||
Height = 38
|
||||
AutoSize = True
|
||||
ButtonHeight = 38
|
||||
ButtonWidth = 107
|
||||
Caption = 'ToolBar1'
|
||||
GradientEndColor = clWindow
|
||||
Images = DataLink_DyeProcess.ImageList_new32
|
||||
List = True
|
||||
GradientDrawingOptions = [gdoHotTrack]
|
||||
ShowCaptions = True
|
||||
TabOrder = 1
|
||||
object Trefresh: TToolButton
|
||||
Left = 0
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21047#26032
|
||||
ImageIndex = 1
|
||||
OnClick = TrefreshClick
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 79
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #19978#31227
|
||||
ImageIndex = 19
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 158
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #19979#31227
|
||||
ImageIndex = 17
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object Tconfirm: TToolButton
|
||||
Left = 237
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20445#23384#26684#24335
|
||||
ImageIndex = 15
|
||||
OnClick = TconfirmClick
|
||||
end
|
||||
object TBDel: TToolButton
|
||||
Left = 348
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #21024#38500#25490#32568
|
||||
ImageIndex = 5
|
||||
OnClick = TBDelClick
|
||||
end
|
||||
object Tclose: TToolButton
|
||||
Left = 459
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 7
|
||||
OnClick = TcloseClick
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 38
|
||||
Width = 1271
|
||||
Height = 83
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
TabOrder = 2
|
||||
ExplicitTop = 27
|
||||
object Label1: TLabel
|
||||
Left = 24
|
||||
Top = 18
|
||||
Width = 64
|
||||
Height = 22
|
||||
Caption = #27969#31243#21345#21495
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 368
|
||||
Top = 18
|
||||
Width = 32
|
||||
Height = 22
|
||||
Caption = #26426#21488
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -16
|
||||
Font.Name = #24494#36719#38597#40657
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object pcid: TcxTextEdit
|
||||
Left = 104
|
||||
Top = 9
|
||||
ParentFont = False
|
||||
Style.Font.Charset = DEFAULT_CHARSET
|
||||
Style.Font.Color = clWindowText
|
||||
Style.Font.Height = -21
|
||||
Style.Font.Name = #24494#36719#38597#40657
|
||||
Style.Font.Style = []
|
||||
Style.IsFontAssigned = True
|
||||
TabOrder = 0
|
||||
OnKeyPress = pcidKeyPress
|
||||
Width = 228
|
||||
end
|
||||
object machName: TcxTextEdit
|
||||
Left = 422
|
||||
Top = 9
|
||||
ParentFont = False
|
||||
Properties.ReadOnly = True
|
||||
Style.Font.Charset = DEFAULT_CHARSET
|
||||
Style.Font.Color = clWindowText
|
||||
Style.Font.Height = -21
|
||||
Style.Font.Name = #24494#36719#38597#40657
|
||||
Style.Font.Style = []
|
||||
Style.IsFontAssigned = True
|
||||
TabOrder = 1
|
||||
Width = 155
|
||||
end
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = ADOQueryList
|
||||
Left = 184
|
||||
Top = 208
|
||||
end
|
||||
object ADOQueryList: TADOQuery
|
||||
Connection = DataLink_DyeProcess.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 232
|
||||
Top = 240
|
||||
end
|
||||
object ADOQueryTmp: TADOQuery
|
||||
Connection = DataLink_DyeProcess.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 232
|
||||
Top = 304
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_DyeProcess.ADOLink
|
||||
Parameters = <>
|
||||
Left = 312
|
||||
Top = 312
|
||||
end
|
||||
object ADOQueryCard: TADOQuery
|
||||
Connection = DataLink_DyeProcess.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 232
|
||||
Top = 360
|
||||
end
|
||||
object ADOQueryMach: TADOQuery
|
||||
Connection = DataLink_DyeProcess.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 320
|
||||
Top = 360
|
||||
end
|
||||
end
|
304
F04染色刷卡/U_MachTaskList.pas
Normal file
304
F04染色刷卡/U_MachTaskList.pas
Normal file
|
@ -0,0 +1,304 @@
|
|||
unit U_MachTaskList;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
|
||||
System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics,
|
||||
cxControls, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinWXI,
|
||||
cxStyles, cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit, cxNavigator,
|
||||
dxDateRanges, dxScrollbarAnnotations, Data.DB, cxDBData, cxGridLevel,
|
||||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
|
||||
cxGridCustomView, cxGrid, Vcl.ComCtrls, Vcl.ToolWin, Data.Win.ADODB,
|
||||
Vcl.ExtCtrls, cxContainer, cxTextEdit, Vcl.StdCtrls, cxMaskEdit, cxButtonEdit,
|
||||
Vcl.Menus, cxButtons, dxSkinsDefaultPainters;
|
||||
|
||||
type
|
||||
TfrmMachTaskList = class(TForm)
|
||||
cxGrid1: TcxGrid;
|
||||
tv1: TcxGridDBTableView;
|
||||
tv1pcid: TcxGridDBColumn;
|
||||
tv1CarNo: TcxGridDBColumn;
|
||||
tv1custName: TcxGridDBColumn;
|
||||
tv1OrderNo: TcxGridDBColumn;
|
||||
tv1C_name: TcxGridDBColumn;
|
||||
tv1c_color: TcxGridDBColumn;
|
||||
tv1taskDate: TcxGridDBColumn;
|
||||
tv1taskRollNum: TcxGridDBColumn;
|
||||
tv1taskQty: TcxGridDBColumn;
|
||||
cxGrid1Level1: TcxGridLevel;
|
||||
ToolBar3: TToolBar;
|
||||
Trefresh: TToolButton;
|
||||
Tconfirm: TToolButton;
|
||||
Tclose: TToolButton;
|
||||
DataSource1: TDataSource;
|
||||
ADOQueryList: TADOQuery;
|
||||
Panel1: TPanel;
|
||||
Label1: TLabel;
|
||||
pcid: TcxTextEdit;
|
||||
Label2: TLabel;
|
||||
machName: TcxTextEdit;
|
||||
ADOQueryTmp: TADOQuery;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryCard: TADOQuery;
|
||||
ADOQueryMach: TADOQuery;
|
||||
TBDel: TToolButton;
|
||||
tv1Column1: TcxGridDBColumn;
|
||||
tv1Column2: TcxGridDBColumn;
|
||||
tv1Column3: TcxGridDBColumn;
|
||||
tv1Column4: TcxGridDBColumn;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
procedure TcloseClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure TconfirmClick(Sender: TObject);
|
||||
procedure TrefreshClick(Sender: TObject);
|
||||
procedure pcidKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure TBDelClick(Sender: TObject);
|
||||
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
private
|
||||
procedure initGrid();
|
||||
public
|
||||
fcurMachId: string;
|
||||
end;
|
||||
|
||||
var
|
||||
frmMachTaskList: TfrmMachTaskList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
U_dataLink, U_rtFun, U_globalVar;
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmMachTaskList.FormCreate(Sender: TObject);
|
||||
begin
|
||||
cxgrid1.Align := alClient;
|
||||
end;
|
||||
|
||||
procedure TfrmMachTaskList.TBDelClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('exec p_delete_machTask');
|
||||
sql.Add('@ids=' + quotedstr(Trim(ADOQueryList.FieldByName('taskid').AsString)));
|
||||
sql.Add(',@user=' + quotedstr(gUserId));
|
||||
ExecSql;
|
||||
end;
|
||||
except
|
||||
application.MessageBox('删除记录失败!', '提示信息', 0);
|
||||
end;
|
||||
initGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmMachTaskList.TcloseClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TfrmMachTaskList.TconfirmClick(Sender: TObject);
|
||||
begin
|
||||
WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, '机台扫描排缸');
|
||||
end;
|
||||
|
||||
procedure TfrmMachTaskList.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
FTaskID: string;
|
||||
begin
|
||||
if ADOQueryList.IsEmpty then
|
||||
Exit;
|
||||
|
||||
FTaskID := ADOQueryList.FieldByName('taskid').AsString;
|
||||
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_UpDown_MD_Machine_Task ');
|
||||
sql.Add('@ids=' + quotedstr(Trim(ADOQueryList.FieldByName('taskid').AsString)));
|
||||
sql.Add(',@flag=0 ');
|
||||
ExecSQL;
|
||||
end;
|
||||
except
|
||||
application.MessageBox('操作失败!', '提示信息', 0);
|
||||
end;
|
||||
initGrid();
|
||||
|
||||
ADOQueryList.Locate('taskid', FTaskID, []);
|
||||
end;
|
||||
|
||||
procedure TfrmMachTaskList.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
FTaskID: string;
|
||||
begin
|
||||
if ADOQueryList.IsEmpty then
|
||||
Exit;
|
||||
|
||||
FTaskID := ADOQueryList.FieldByName('taskid').AsString;
|
||||
|
||||
try
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
SQL.Clear;
|
||||
sql.Add('exec P_UpDown_MD_Machine_Task ');
|
||||
sql.Add('@ids=' + quotedstr(Trim(ADOQueryList.FieldByName('taskid').AsString)));
|
||||
sql.Add(',@flag=1 ');
|
||||
ExecSQL;
|
||||
end;
|
||||
except
|
||||
application.MessageBox('操作失败!', '提示信息', 0);
|
||||
end;
|
||||
initGrid();
|
||||
|
||||
ADOQueryList.Locate('taskid', FTaskID, []);
|
||||
end;
|
||||
|
||||
procedure TfrmMachTaskList.TrefreshClick(Sender: TObject);
|
||||
begin
|
||||
initGrid();
|
||||
end;
|
||||
|
||||
////////////////////////////////////////////
|
||||
///
|
||||
procedure TfrmMachTaskList.FormShow(Sender: TObject);
|
||||
begin
|
||||
ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, '机台扫描排缸');
|
||||
initGrid();
|
||||
end;
|
||||
|
||||
procedure TfrmMachTaskList.initGrid();
|
||||
begin
|
||||
try
|
||||
ADOQueryList.DisableControls;
|
||||
with ADOQueryList do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('select a.*,b.custName,b.orderno,B.c_color,B.c_name,B.PCID,B.C_ColorNo');
|
||||
sql.Add('from MD_Machine_Task a');
|
||||
sql.Add('inner join Dye_Plan_Card b on b.pcid=a.pcid');
|
||||
sql.Add('where a.status=''0''');
|
||||
sql.Add('and A.mcid=' + quotedstr(fcurMachId));
|
||||
sql.Add('and not EXISTS(select 1 from Dye_Cloth_Stock X where X.pcid=B.pcid)');
|
||||
sql.add('and not EXISTS(select 1 from Dye_Plan_Card_Move X where X.FromID= B.pcid)');
|
||||
sql.Add('order by a.order_idx ');
|
||||
// ShowMessage(SQL.Text);
|
||||
// a.taskDate,
|
||||
open;
|
||||
end;
|
||||
finally
|
||||
ADOQueryList.EnableControls;
|
||||
tv1.ApplyBestFit();
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMachTaskList.pcidKeyPress(Sender: TObject; var Key: Char);
|
||||
var
|
||||
glideIds: string;
|
||||
begin
|
||||
if Key = #13 then
|
||||
begin
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with ADOQueryCard do
|
||||
begin
|
||||
close;
|
||||
sql.clear;
|
||||
sql.add(' select top 1 A.OrderNo,A.workShop,A.PSC_StkPiece,A.PSC_StkQty,B.GlideId,B.GlideNo,B.GlideName ');
|
||||
sql.add(' from Dye_Plan_Card A ');
|
||||
sql.add(' left join Dye_Plan_Glide B on A.pcid=B.pcid ');
|
||||
sql.add(' where A.pcid= ' + QuotedStr(Trim(pcid.Text)));
|
||||
// sql.add(' and B.Completeness < 100 ');
|
||||
sql.add(' and not exists(select * from Dye_Plan_Glide_output e where e.glideno=b.glideno and e.pcid=a.pcid)');
|
||||
sql.add(' order by B.GlideNo ');
|
||||
open;
|
||||
end;
|
||||
|
||||
if ADOQueryCard.RecordCount = 0 then
|
||||
begin
|
||||
raise Exception.Create('未找到流程卡或流程卡未安排工序!');
|
||||
end;
|
||||
|
||||
with ADOQueryMach do
|
||||
begin
|
||||
close;
|
||||
sql.clear;
|
||||
sql.add(' select A.* from Bs_Machine A ');
|
||||
sql.add(' where A.mcid= ' + QuotedStr(Trim(fcurMachId)));
|
||||
open;
|
||||
end;
|
||||
|
||||
if ADOQueryMach.RecordCount = 0 then
|
||||
begin
|
||||
raise Exception.Create('未找到机台!');
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.clear;
|
||||
sql.add('select * from MD_Machine_Task ');
|
||||
sql.add('where 1=2');
|
||||
open;
|
||||
append;
|
||||
|
||||
fieldByName('mcId').value := Trim(fcurMachId);
|
||||
fieldByName('mcNo').value := Trim(ADOQueryMach.FieldByName('mcno').AsString);
|
||||
fieldByName('taskDate').value := SGetServerDate(ADOQueryTmp);
|
||||
fieldByName('orderNo').value := trim(ADOQueryCard.FieldByName('orderNo').AsString);
|
||||
fieldByName('pcId').value := Trim(pcid.Text);
|
||||
fieldByName('status').value := '0';
|
||||
fieldByName('glideGroup').value := '';
|
||||
fieldByName('machGroupNo').value := '';
|
||||
fieldByName('workShop').value := trim(ADOQueryCard.FieldByName('workShop').AsString);
|
||||
fieldByName('taskRollNum').value := ADOQueryCard.FieldByName('PSC_StkPiece').AsFloat;
|
||||
fieldByName('taskQty').value := ADOQueryCard.FieldByName('PSC_StkQty').AsFloat;
|
||||
|
||||
fieldByName('taskType').value := '手动';
|
||||
fieldByName('curGlideName').value := trim(ADOQueryCard.FieldByName('glideName').AsString);
|
||||
fieldByName('curGlide').value := trim(ADOQueryCard.FieldByName('glideName').AsString);
|
||||
fieldByName('GlideId').value := trim(ADOQueryCard.FieldByName('GlideId').AsString);
|
||||
fieldByName('deleted').value := 0;
|
||||
fieldByName('filler').value := gUserName;
|
||||
post;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update MD_Machine_Task set order_idx=isnull((select floor(max(order_idx)) from MD_Machine_Task X where X.mcNo=MD_Machine_Task.mcNo),0)+1');
|
||||
sql.Add('where order_idx is null');
|
||||
ExecSql;
|
||||
end;
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
close;
|
||||
sql.Clear;
|
||||
sql.Add('update dye_plan_glide set pc_flag=1');
|
||||
sql.Add('where glideId =' + quotedstr(trim(ADOQueryCard.FieldByName('GlideId').AsString)));
|
||||
ExecSql;
|
||||
end;
|
||||
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
if ADOQueryCmd.Connection.InTransaction then
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||
// showMessage('插入任务数据时发生错误!');
|
||||
end;
|
||||
initGrid();
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user