This commit is contained in:
LAPTOP-8NOV8MVQ\cai 2025-06-19 10:41:40 +08:00
parent 780fc19a0a
commit c577dbf586
6 changed files with 670 additions and 241 deletions

View File

@ -895,6 +895,7 @@
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
</Deployment>
<ModelSupport>False</ModelSupport>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>

View File

@ -1,50 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<Transactions>
<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.832,=D:\Dp10Repo\public10\design\U_BaseHelp.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.431,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.dfm=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.dfm</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.135,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ZDYHelp.pas=</Transaction>
<Transaction>1899/12/30 00:00:00.000.873,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.290,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_TatClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm</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.472,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.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.754,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.pas=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_TatClothInfo.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm</Transaction>
<Transaction>1899/12/30 00:00:00.000.146,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.616,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LablePrint.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.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.149,=D:\Dp10Repo\public10\ThreeFun\Form\U_ZDYHelp.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.873,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LbaelMapSet.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.339,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.518,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.503,=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.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.431,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.pas=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.305,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_KnitClothInfoSel.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.290,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_TatClothInfoSel.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.939,=D:\Dp10Repo\public10\design\U_BaseInput.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.305,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_KnitClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.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.290,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_TatClothInfoSel.dfm</Transaction>
<Transaction>1899/12/30 00:00:00.000.305,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_KnitClothInfoSel.dfm</Transaction>
<Transaction>1899/12/30 00:00:00.000.187,D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.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.493,=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\Unit1.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.743,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.228,=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.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.736,D:\Dp10Repo\项目代码\睿特\新DLL初始化(CSH.dll)\U_ModuleNote.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.754,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_TatClothInfo.pas=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.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.290,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_TatClothInfoSel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.340,=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_CloInfoFileUp.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.431,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.pas=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.217,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelMapSet.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.754,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_TatClothInfo.dfm=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.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.504,=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothType.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.305,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_KnitClothInfoSel.dfm=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.dfm</Transaction>
<Transaction>1899/12/30 00:00:00.000.743,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_LabelPrint.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.431,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.dfm=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo.dfm</Transaction>
<Transaction>1899/12/30 00:00:00.000.146,=D:\Dp10Repo\public10\ThreeFun\Fun\uSZHN_JSON.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.806,D:\Dp10Repo\项目代码\RTBasics\A00通用模板\InformationBase.dproj=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\ClothInfo.dproj</Transaction>
<Transaction>1899/12/30 00:00:00.000.340,=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_CloInfoFileUp.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.123,=D:\Dp10Repo\public10\design\U_globalVar.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.472,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_YarnInfoSel.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.754,D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_ClothInfo_Tat.dfm=D:\Dp10Repo\项目代码\RTBasics\A02基础产品管理\U_TatClothInfo.dfm</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.692,D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_ClothInfoSel.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.806,D:\Dp10Repo\项目代码\RTBasics\A00通用模板\ClothInfo.dproj=D:\Dp10Repo\项目代码\RTBasics\A00通用模板\InformationBase.dproj</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>
<Transaction>1899/12/30 00:00:00.000.422,=D:\Dp10Repo\项目代码\RTBasics\A00通用窗体\U_CompanySel.pas</Transaction>
<Transaction>2025/06/13 15:31:04.000.480,=D:\Dp10Repo\项目代码\D10sxYilanbuyi\A00通用窗体\U_ProductInfoSel.pas</Transaction>
<Transaction>2025/06/13 15:43:57.000.936,=D:\Dp10Repo\项目代码\D10sxYilanbuyi\A02基础产品管理\U_ClothInfoInput.pas</Transaction>
</Transactions>

View File

@ -52,13 +52,13 @@ inherited frmClothInfo: TfrmClothInfo
ImageIndex = 9
OnClick = TBAddClick
end
object ToolButton1: TToolButton
object TbLook: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #26597#30475
ImageIndex = 4
OnClick = ToolButton1Click
OnClick = TbLookClick
end
object TBCopy: TToolButton
Left = 284
@ -338,7 +338,7 @@ inherited frmClothInfo: TfrmClothInfo
Align = alClient
PopupMenu = PM_1
TabOrder = 0
ExplicitLeft = 6
ExplicitLeft = -2
ExplicitTop = 59
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
@ -394,6 +394,13 @@ inherited frmClothInfo: TfrmClothInfo
HeaderAlignmentHorz = taCenter
Width = 96
end
object Tv1CINote: TcxGridDBColumn
Caption = #22791#27880
DataBinding.FieldName = 'CINote'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
object v1Column3: TcxGridDBColumn
Caption = #38376#24133
DataBinding.FieldName = 'C_Width'
@ -680,7 +687,7 @@ inherited frmClothInfo: TfrmClothInfo
TabOrder = 3
Properties.CustomButtons.Buttons = <>
Properties.Style = 9
Properties.TabIndex = 2
Properties.TabIndex = 0
Properties.Tabs.Strings = (
#26410#23457#26680
#24050#23457#26680

View File

@ -110,7 +110,7 @@ type
Tv1Column5: TcxGridDBColumn;
Tv1Column6: TcxGridDBColumn;
Tv1Column7: TcxGridDBColumn;
ToolButton1: TToolButton;
TbLook: TToolButton;
DataSource3: TDataSource;
CDS_Sub: TClientDataSet;
Tv1Column9: TcxGridDBColumn;
@ -134,6 +134,7 @@ type
cxTabControl1: TcxTabControl;
Tv1Chker: TcxGridDBColumn;
Tv1Column1: TcxGridDBColumn;
Tv1CINote: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure TBDelClick(Sender: TObject);
@ -154,7 +155,7 @@ type
procedure TCBNOR1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure TbLookClick(Sender: TObject);
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
procedure ToolButton2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
@ -243,20 +244,16 @@ end;
procedure TfrmClothInfo.SetStatus();
begin
TBAdd.Enabled := False;
TBCopy.Enabled := False;
TBEdit.Enabled := False;
TBMLEdit.Enabled := False;
TBDel.Enabled := False;
TBUP.Enabled := False;
TBAdd.Visible := False;
TBCopy.Visible := False;
TBEdit.Visible := False;
TBMLEdit.Visible := False;
TBDel.Visible := False;
TBUP.Visible := False;
if FJurisdiction <> '²éѯ' then
begin
TBAdd.Enabled := true;
TBCopy.Enabled := true;
TBEdit.Enabled := true;
TBMLEdit.Enabled := true;
TBDel.Enabled := true;
TBUP.Enabled := true;
TBAdd.Visible := true;
TBCopy.Visible := true;
end;
TbCheck.Visible := false;
@ -270,7 +267,9 @@ begin
begin
TbCheck.Visible := true;
TBDel.Visible := true;
TBEdit.Visible := true;
TBMLEdit.Visible := true;
TBUP.Visible := true;
end;
if cxTabControl1.TabIndex = 1 then
begin
@ -402,6 +401,27 @@ begin
sql.Add('delete BS_Cloth_Info where BCIID=''' + Trim(CDS_1.fieldbyname('BCIID').AsString) + '''');
ExecSQL;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('delete BS_Cloth_GY_Main where BCIID=''' + Trim(CDS_1.fieldbyname('BCIID').AsString) + '''');
ExecSQL;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('delete BS_Cloth_GY_Sub where BCIID=''' + Trim(CDS_1.fieldbyname('BCIID').AsString) + '''');
ExecSQL;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('delete BS_Cloth_GX where BCIID=''' + Trim(CDS_1.fieldbyname('BCIID').AsString) + '''');
ExecSQL;
end;
end;
CDS_1.Delete;
end;
@ -575,7 +595,7 @@ begin
frmClothInfoInput := TfrmClothInfoInput.Create(Application);
with frmClothInfoInput do
begin
CopyInt := 1;
CopyInt := 2;
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
@ -629,7 +649,7 @@ begin
frmClothInfoInput := TfrmClothInfoInput.Create(Application);
with frmClothInfoInput do
begin
CopyInt := 0;
CopyInt := 3;
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
if ShowModal = 1 then
@ -804,14 +824,14 @@ begin
InitGrid();
end;
procedure TfrmClothInfo.ToolButton1Click(Sender: TObject);
procedure TfrmClothInfo.TbLookClick(Sender: TObject);
begin
try
frmClothInfoInput := TfrmClothInfoInput.Create(Application);
with frmClothInfoInput do
begin
CopyInt := 0;
ToolButton1.Visible := False;
CopyInt := 1;
// TbLook.Visible := False;
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
if ShowModal = 1 then

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,7 @@ uses
dxSkinTheBezier, dxSkinValentine, dxSkinVisualStudio2013Blue,
dxSkinVisualStudio2013Dark, dxSkinVisualStudio2013Light, dxSkinVS2010,
dxSkinWhiteprint, dxSkinWXI, dxSkinXmas2008Blue, cxContainer, cxLabel, cxPC,
dxScrollbarAnnotations, cxMaskEdit;
dxScrollbarAnnotations, cxMaskEdit, Vcl.Menus, cxButtons;
type
TfrmClothInfoInput = class(TForm)
@ -383,13 +383,13 @@ type
Panel11: TPanel;
Label1: TLabel;
ToolBar2: TToolBar;
ToolButton2: TToolButton;
ToolButton3: TToolButton;
ToolButton1: TToolButton;
ToolButton4: TToolButton;
ToolButton5: TToolButton;
ToolButton6: TToolButton;
ToolButton7: TToolButton;
TbQX: TToolButton;
TbDX: TToolButton;
TbFS: TToolButton;
TbFP: TToolButton;
TbGJ: TToolButton;
TbZM: TToolButton;
TbDelete: TToolButton;
C_Name: TcxTextEdit;
dx_UnpackingMethod: TcxComboBox;
dx_OpenAmplitude: TcxComboBox;
@ -435,6 +435,16 @@ type
ToolBar5: TToolBar;
TbAdd3: TToolButton;
TbDel3: TToolButton;
TbCPReplace: TcxButton;
TbDXReplace: TcxButton;
TbFSReplace: TcxButton;
TbFPReplace: TcxButton;
TbGJReplace: TcxButton;
cxButton1: TcxButton;
cxButton2: TcxButton;
cxButton3: TcxButton;
cxButton4: TcxButton;
cxButton5: TcxButton;
procedure FormShow(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
procedure TbSaveClick(Sender: TObject);
@ -444,15 +454,15 @@ type
procedure C_WidthBtnUpClick(Sender: TObject);
procedure TbUpFileClick(Sender: TObject);
procedure C_FromNameBtnUpClick(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure TbQXClick(Sender: TObject);
procedure SetXH();
procedure ToolButton3Click(Sender: TObject);
procedure TbDXClick(Sender: TObject);
procedure Tv1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure ToolButton7Click(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure ToolButton4Click(Sender: TObject);
procedure ToolButton5Click(Sender: TObject);
procedure ToolButton6Click(Sender: TObject);
procedure TbDeleteClick(Sender: TObject);
procedure TbFSClick(Sender: TObject);
procedure TbFPClick(Sender: TObject);
procedure TbGJClick(Sender: TObject);
procedure TbZMClick(Sender: TObject);
procedure Tv11fs_unitPropertiesEditValueChanged(Sender: TObject);
procedure Tv2fp_unitPropertiesEditValueChanged(Sender: TObject);
procedure Tv3gj_unitPropertiesEditValueChanged(Sender: TObject);
@ -466,12 +476,25 @@ type
procedure TbDel3Click(Sender: TObject);
procedure Tv11fs_NamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure Tv3gj_NamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure TbCPReplaceClick(Sender: TObject);
procedure TbDXReplaceClick(Sender: TObject);
procedure TbFSReplaceClick(Sender: TObject);
procedure TbFPReplaceClick(Sender: TObject);
procedure TbGJReplaceClick(Sender: TObject);
procedure cxButton1Click(Sender: TObject);
procedure cxButton2Click(Sender: TObject);
procedure cxButton3Click(Sender: TObject);
procedure cxButton4Click(Sender: TObject);
procedure cxButton5Click(Sender: TObject);
private
canshu1: string;
Fint: Integer;
procedure InitGrid();
procedure ArrangeTabsByDataset;
function SaveData(): Boolean;
function FindLastEditedTextEdit(AParent: TWinControl; const AHint: string): string;
procedure FillAllTextEditsWithValue(AParent: TWinControl; const AHint, AValue: string; AExclude: TcxTextEdit = nil);
procedure ClearAllTextEditsByHint(AParent: TWinControl; const AHint: string; AExclude: TcxTextEdit = nil);
{ Private declarations }
public
FBCIID, FCTID, FProcessID: string;
@ -658,15 +681,73 @@ begin
end;
procedure TfrmClothInfoInput.FormShow(Sender: TObject);
var
MaxBCIID, MaxProcessID, MaxBCPID: string;
Maxid1, maxid2, maxid3, maxgx: string;
begin
InitGrid();
ArrangeTabsByDataset;
if CopyInt = 1 then
if CopyInt = 3 then
begin
FBCIID := '';
C_Code.text := '';
C_Name.text := '';
C_Code.text := '自动生成';
end;
if CopyInt = 1 then //查看
begin
TbSave.Enabled := False;
TbUpFile.Enabled := False;
TbQX.Enabled := False;
TbDX.Enabled := False;
TbFS.Enabled := False;
TbFP.Enabled := False;
TbGJ.Enabled := False;
TbZM.Enabled := False;
TbDelete.Enabled := False;
end;
with CDS_GX do
begin
First;
while not Eof do
begin
Edit;
CDS_GX.fieldbyname('GXID').AsString := '';
Post;
Next;
end;
end;
with CDS_1 do
begin
First;
while not Eof do
begin
Edit;
CDS_1.fieldbyname('BCPID').AsString := '';
Post;
Next;
end;
end;
with CDS_2 do
begin
First;
while not Eof do
begin
Edit;
CDS_2.fieldbyname('BCPID').AsString := '';
Post;
Next;
end;
end;
with CDS_3 do
begin
First;
while not Eof do
begin
Edit;
CDS_3.fieldbyname('BCPID').AsString := '';
Post;
Next;
end;
end;
end;
@ -832,6 +913,7 @@ begin
First;
while not Eof do
begin
if Trim(CDS_GX.fieldbyname('GXID').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, maxgx, 'GX', 'Bs_Cloth_GX', 5, 1) = False then
@ -863,7 +945,6 @@ begin
else
begin
Edit;
end;
FieldByName('BCIID').Value := Trim(MaxBCIID);
@ -885,6 +966,7 @@ begin
First;
while not Eof do
begin
if Trim(CDS_1.fieldbyname('BCPID').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, Maxid1, 'FS', 'Bs_Cloth_GY_Sub', 5, 1) = False then
@ -939,6 +1021,7 @@ begin
First;
while not Eof do
begin
if Trim(CDS_2.fieldbyname('BCPID').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, maxid2, 'FP', 'Bs_Cloth_GY_Sub', 5, 1) = False then
@ -993,6 +1076,14 @@ begin
First;
while not Eof do
begin
if copyInt = 1 then
begin
CDS_3.Edit;
// CDS_GX.fieldbyname('GXID').AsString := '';
// CDS_1.fieldbyname('BCPID').AsString := '';
// CDS_2.fieldbyname('BCPID').AsString := '';
CDS_3.fieldbyname('BCPID').AsString := '';
end;
if Trim(CDS_3.fieldbyname('BCPID').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, maxid3, 'GJ', 'Bs_Cloth_GY_Sub', 5, 1) = False then
@ -1039,7 +1130,7 @@ begin
Next;
end;
end;
//////////////// 保存发泡子表 //////////////////////
//////////////// 保存刮胶子表 //////////////////////
ADOQueryCmd.Connection.CommitTrans;
FBCIID := MaxBCIID;
Result := True;
@ -1083,7 +1174,7 @@ begin
end;
end;
procedure TfrmClothInfoInput.ToolButton1Click(Sender: TObject);
procedure TfrmClothInfoInput.TbFSClick(Sender: TObject);
var
i: Integer;
begin
@ -1113,7 +1204,7 @@ begin
ArrangeTabsByDataset;
end;
procedure TfrmClothInfoInput.ToolButton2Click(Sender: TObject);
procedure TfrmClothInfoInput.TbQXClick(Sender: TObject);
var
i: Integer;
begin
@ -1143,7 +1234,7 @@ begin
ArrangeTabsByDataset;
end;
procedure TfrmClothInfoInput.ToolButton3Click(Sender: TObject);
procedure TfrmClothInfoInput.TbDXClick(Sender: TObject);
var
i: Integer;
begin
@ -1173,7 +1264,12 @@ begin
ArrangeTabsByDataset;
end;
procedure TfrmClothInfoInput.ToolButton4Click(Sender: TObject);
procedure TfrmClothInfoInput.TbDXReplaceClick(Sender: TObject);
begin
FillAllTextEditsWithValue(panel3, '定型烘箱温度', FindLastEditedTextEdit(panel3, '定型烘箱温度'));
end;
procedure TfrmClothInfoInput.TbFPClick(Sender: TObject);
var
i: Integer;
begin
@ -1203,7 +1299,12 @@ begin
ArrangeTabsByDataset;
end;
procedure TfrmClothInfoInput.ToolButton5Click(Sender: TObject);
procedure TfrmClothInfoInput.TbFPReplaceClick(Sender: TObject);
begin
FillAllTextEditsWithValue(panel5, '发泡烘箱温度', FindLastEditedTextEdit(panel5, '发泡烘箱温度'));
end;
procedure TfrmClothInfoInput.TbGJClick(Sender: TObject);
var
i: Integer;
begin
@ -1233,7 +1334,12 @@ begin
ArrangeTabsByDataset;
end;
procedure TfrmClothInfoInput.ToolButton6Click(Sender: TObject);
procedure TfrmClothInfoInput.TbGJReplaceClick(Sender: TObject);
begin
FillAllTextEditsWithValue(panel6, '刮胶烘箱温度', FindLastEditedTextEdit(panel6, '刮胶烘箱温度'));
end;
procedure TfrmClothInfoInput.TbZMClick(Sender: TObject);
var
i: Integer;
begin
@ -1262,7 +1368,7 @@ begin
ArrangeTabsByDataset;
end;
procedure TfrmClothInfoInput.ToolButton7Click(Sender: TObject);
procedure TfrmClothInfoInput.TbDeleteClick(Sender: TObject);
begin
if CDS_GX.IsEmpty then
Exit;
@ -1279,6 +1385,8 @@ begin
sql.Add('and gyType=''' + Trim(CDS_GX.fieldbyname('gxName').AsString) + '''');
ExecSQL;
end;
if CDS_gx.fieldByName('gxname').Value = '清洗' then
begin
//防水子表更新
with ADOQueryTemp do
begin
@ -1290,6 +1398,9 @@ begin
end;
SCreateCDS(ADOQueryTemp, CDS_1);
SInitCDSData(ADOQueryTemp, CDS_1);
end
else if CDS_gx.fieldByName('gxname').Value = '发泡' then
begin
//发泡子表更新
with ADOQueryTemp do
begin
@ -1301,6 +1412,9 @@ begin
end;
SCreateCDS(ADOQueryTemp, CDS_2);
SInitCDSData(ADOQueryTemp, CDS_2);
end
else if CDS_gx.fieldByName('gxname').Value = '刮胶' then
begin
//刮胶子表更新
with ADOQueryTemp do
begin
@ -1312,6 +1426,11 @@ begin
end;
SCreateCDS(ADOQueryTemp, CDS_3);
SInitCDSData(ADOQueryTemp, CDS_3);
// end;
end;
// else
// begin
// CDS_GX.Delete;
// end;
////////////////////////////////////// 子表更新结束//////////////////////
/////////////////////////主表更新开始/////////////////////////////////
@ -1361,11 +1480,6 @@ begin
SClearData(panel7, 2);
zm_UnpackingMethod.Text := '';
end;
if Trim(CDS_GX.fieldbyname('GXID').AsString) <> '' then
begin
SaveData();
end;
/////////////////////////////////主表更新结束//////////////////////////////////
with ADOQueryCmd do
begin
Close;
@ -1373,8 +1487,14 @@ begin
sql.Add('delete Bs_Cloth_GX where GXID=''' + Trim(CDS_GX.fieldbyname('GXID').AsString) + '''');
ExecSQL;
end;
// showMessage();
CDS_GX.Delete;
SetXH();
if Trim(CDS_GX.fieldbyname('GXID').AsString) <> '' then
begin
SaveData();
end;
/////////////////////////////////主表更新结束//////////////////////////////////
ArrangeTabsByDataset;
end;
@ -1555,6 +1675,147 @@ begin
// end;
end;
procedure TfrmClothInfoInput.TbCPReplaceClick(Sender: TObject);
begin
FillAllTextEditsWithValue(panel2, '清洗水温', FindLastEditedTextEdit(panel2, '清洗水温'));
end;
//function TfrmClothInfoInput.FindLastEditedTextEdit(AParent: TWinControl; const AHint: string): string;
//var
// i: Integer;
// AControl: TControl;
//begin
// Result := '';
// for i := 0 to AParent.ControlCount - 1 do
// begin
// AControl := AParent.Controls[i];
// if (AControl is TcxTextEdit) and ((AControl as TcxTextEdit).Hint = AHint) and ((AControl as TcxTextEdit).Text <> '') then // 仅检查非空输入框
// begin
// Result := (AControl as TcxTextEdit).text; // 返回最后一个非空控件(简单实现)
// end;
// end;
//end;
function TfrmClothInfoInput.FindLastEditedTextEdit(AParent: TWinControl; const AHint: string): string;
var
i, j: Integer;
AControl: TControl;
SortedControls: TList;
TempControl: TControl;
begin
Result := '';
// 如果没有子控件,直接返回空
if AParent.ControlCount = 0 then
Exit;
// 使用 TList 存储控件(兼容旧版 Delphi
SortedControls := TList.Create;
try
// 将所有子控件添加到列表
for i := 0 to AParent.ControlCount - 1 do
SortedControls.Add(AParent.Controls[i]);
// 手动排序:按 TopY坐标 LeftX坐标升序排列
for i := 0 to SortedControls.Count - 1 do
begin
for j := i + 1 to SortedControls.Count - 1 do
begin
// 比较两个控件的 Top Left
if (TControl(SortedControls[i]).Top > TControl(SortedControls[j]).Top) or
((TControl(SortedControls[i]).Top = TControl(SortedControls[j]).Top) and
(TControl(SortedControls[i]).Left > TControl(SortedControls[j]).Left)) then
begin
// 交换位置
TempControl := TControl(SortedControls[i]);
SortedControls[i] := SortedControls[j];
SortedControls[j] := TempControl;
end;
end;
end;
// 遍历排序后的控件
for i := 0 to SortedControls.Count - 1 do
begin
AControl := TControl(SortedControls[i]);
if (AControl is TcxTextEdit) and
(TcxTextEdit(AControl).Hint = AHint) and
(TcxTextEdit(AControl).Text <> '') then
begin
Result := TcxTextEdit(AControl).Text; // 最后一个符合条件的会被保留
end;
end;
finally
SortedControls.Free;
end;
end;
procedure TfrmClothInfoInput.FillAllTextEditsWithValue(AParent: TWinControl; const AHint, AValue: string; AExclude: TcxTextEdit = nil); // 可选:排除特定控件
var
i: Integer;
AControl: TControl;
ATextEdit: TcxTextEdit;
begin
for i := 0 to AParent.ControlCount - 1 do
begin
AControl := AParent.Controls[i];
if (AControl is TcxTextEdit) and ((AControl as TcxTextEdit).Text = '') then
begin
ATextEdit := AControl as TcxTextEdit;
if (ATextEdit.Hint = AHint) and (ATextEdit <> AExclude) then
ATextEdit.Text := AValue;
end;
end;
end;
procedure TfrmClothInfoInput.ClearAllTextEditsByHint(AParent: TWinControl; const AHint: string; AExclude: TcxTextEdit = nil);
var
i: Integer;
AControl: TControl;
begin
for i := 0 to AParent.ControlCount - 1 do
begin
AControl := AParent.Controls[i];
// 检查是否是 TcxTextEdit并且 Hint 匹配,且不是排除的控件
if (AControl is TcxTextEdit) and
(TcxTextEdit(AControl).Hint = AHint) and
(TcxTextEdit(AControl) <> AExclude) then
begin
TcxTextEdit(AControl).Text := ''; // 直接清空
end;
end;
end;
procedure TfrmClothInfoInput.cxButton1Click(Sender: TObject);
begin
ClearAllTextEditsByHint(panel4, '防水烘箱温度');
end;
procedure TfrmClothInfoInput.cxButton2Click(Sender: TObject);
begin
ClearAllTextEditsByHint(panel2, '清洗水温');
end;
procedure TfrmClothInfoInput.cxButton3Click(Sender: TObject);
begin
ClearAllTextEditsByHint(panel3, '定型烘箱温度');
end;
procedure TfrmClothInfoInput.cxButton4Click(Sender: TObject);
begin
ClearAllTextEditsByHint(panel5, '发泡烘箱温度');
end;
procedure TfrmClothInfoInput.cxButton5Click(Sender: TObject);
begin
ClearAllTextEditsByHint(panel6, '刮胶烘箱温度');
end;
procedure TfrmClothInfoInput.TbFSReplaceClick(Sender: TObject);
begin
FillAllTextEditsWithValue(panel4, '防水烘箱温度', FindLastEditedTextEdit(panel4, '防水烘箱温度'));
end;
procedure TfrmClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then