D10sxYilanbuyi/A02基础产品管理/U_ClothInfoInput.pas

1294 lines
34 KiB
ObjectPascal
Raw Normal View History

2025-06-06 13:56:41 +08:00
unit U_ClothInfoInput;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ADODB, DBClient, cxGridLevel, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit,
cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, U_BaseList,
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters,
2025-06-07 17:31:07 +08:00
cxNavigator, dxDateRanges, dxBarBuiltInMenu, cxCheckBox, cxDropDownEdit,
dxSkinBasic, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
dxSkinCoffee, dxSkinDarkroom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinOffice2016Colorful,
dxSkinOffice2016Dark, dxSkinOffice2019Black, dxSkinOffice2019Colorful,
dxSkinOffice2019DarkGray, dxSkinOffice2019White, dxSkinPumpkin, dxSkinSeven,
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
dxSkinSpringtime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
dxSkinTheBezier, dxSkinValentine, dxSkinVisualStudio2013Blue,
dxSkinVisualStudio2013Dark, dxSkinVisualStudio2013Light, dxSkinVS2010,
dxSkinWhiteprint, dxSkinWXI, dxSkinXmas2008Blue, cxContainer, cxLabel, cxPC,
dxScrollbarAnnotations;
2025-06-06 13:56:41 +08:00
type
TfrmClothInfoInput = class(TForm)
ToolBar1: TToolBar;
2025-06-10 17:34:06 +08:00
TbSave: TToolButton;
2025-06-06 13:56:41 +08:00
TBClose: TToolButton;
ADOQueryCmd: TADOQuery;
ADOQueryTemp: TADOQuery;
2025-06-10 17:34:06 +08:00
TbUpFile: TToolButton;
2025-06-06 13:56:41 +08:00
CDS_1: TClientDataSet;
DS_1: TDataSource;
GPM_1: TcxGridPopupMenu;
2025-06-07 17:31:07 +08:00
cxPageControl1: TcxPageControl;
cxTabSheet1: TcxTabSheet;
cxTabSheet2: TcxTabSheet;
cxTabSheet3: TcxTabSheet;
cxTabSheet4: TcxTabSheet;
cxGrid2: TcxGrid;
2025-06-10 17:34:06 +08:00
Tv1: TcxGridDBTableView;
Tv11fs_Name: TcxGridDBColumn;
Tv11fs_spel: TcxGridDBColumn;
Tv11fs_unit: TcxGridDBColumn;
Tv11fs_rate: TcxGridDBColumn;
Tv11fs_precautions: TcxGridDBColumn;
Tv11fs_meter: TcxGridDBColumn;
Tv11fs_useGlub: TcxGridDBColumn;
Tv11fs_waterDistribution: TcxGridDBColumn;
Tv11fs_useOneMeter: TcxGridDBColumn;
Tv11fs_useOneGlub: TcxGridDBColumn;
2025-06-07 17:31:07 +08:00
cxGridLevel1: TcxGridLevel;
cxTabSheet5: TcxTabSheet;
cxGrid1: TcxGrid;
2025-06-10 17:34:06 +08:00
Tv2: TcxGridDBTableView;
Tv2fp_Name: TcxGridDBColumn;
Tv2fp_spel: TcxGridDBColumn;
Tv2fp_unit: TcxGridDBColumn;
Tv2fp_rate: TcxGridDBColumn;
Tv2fp_precautions: TcxGridDBColumn;
2025-06-07 17:31:07 +08:00
cxGridDBColumn16: TcxGridDBColumn;
cxGridDBColumn17: TcxGridDBColumn;
cxGridDBColumn18: TcxGridDBColumn;
2025-06-10 17:34:06 +08:00
Tv2fp_useOneMeter: TcxGridDBColumn;
Tv2fp_useOneGlub: TcxGridDBColumn;
2025-06-07 17:31:07 +08:00
cxGridLevel2: TcxGridLevel;
cxTabSheet6: TcxTabSheet;
cxGrid3: TcxGrid;
2025-06-10 17:34:06 +08:00
Tv3: TcxGridDBTableView;
Tv3gj_Name: TcxGridDBColumn;
Tv3gj_spel: TcxGridDBColumn;
Tv3gj_unit: TcxGridDBColumn;
TV3gj_rate: TcxGridDBColumn;
Tv3gj_precautions: TcxGridDBColumn;
2025-06-07 17:31:07 +08:00
cxGridDBColumn26: TcxGridDBColumn;
cxGridDBColumn27: TcxGridDBColumn;
cxGridDBColumn28: TcxGridDBColumn;
2025-06-10 17:34:06 +08:00
Tv3gj_useOneMeter: TcxGridDBColumn;
Tv3gj_useOneGlub: TcxGridDBColumn;
2025-06-07 17:31:07 +08:00
cxGridLevel3: TcxGridLevel;
Panel1: TPanel;
C_GramWeight: TcxTextEdit;
C_Name: TcxTextEdit;
2025-06-10 17:34:06 +08:00
F_Width: TcxTextEdit;
2025-06-07 17:31:07 +08:00
cxLabel37: TcxLabel;
cxLabel38: TcxLabel;
cxLabel39: TcxLabel;
cxLabel40: TcxLabel;
cxLabel41: TcxLabel;
cxLabel42: TcxLabel;
cxLabel43: TcxLabel;
cxLabel44: TcxLabel;
cxLabel45: TcxLabel;
cxLabel46: TcxLabel;
cxLabel47: TcxLabel;
cxLabel48: TcxLabel;
2025-06-10 17:34:06 +08:00
Material: TcxTextEdit;
LatitudeSlope: TcxTextEdit;
FinishingStandards: TcxTextEdit;
F_Name: TcxTextEdit;
C_FinishLongitudeDensity: TcxTextEdit;
C_Width: TcxTextEdit;
F_GramWeight: TcxTextEdit;
C_FinishLatitudeDensity: TcxTextEdit;
Finishingtype: TcxTextEdit;
2025-06-07 17:31:07 +08:00
Panel2: TPanel;
cxLabel10: TcxLabel;
cxLabel11: TcxLabel;
cxLabel12: TcxLabel;
cxLabel13: TcxLabel;
cxLabel14: TcxLabel;
cxLabel15: TcxLabel;
cxLabel16: TcxLabel;
cxLabel17: TcxLabel;
cxLabel18: TcxLabel;
cxLabel19: TcxLabel;
cxLabel20: TcxLabel;
cxLabel7: TcxLabel;
cxLabel8: TcxLabel;
cxLabel9: TcxLabel;
2025-06-10 17:34:06 +08:00
qx_WaterContent: TcxTextEdit;
qx_RollMethod: TcxTextEdit;
qx_Add_Name: TcxTextEdit;
qx_Precautions: TcxTextEdit;
qx_temperature4: TcxTextEdit;
qx_temperature2: TcxTextEdit;
qx_temperature1: TcxTextEdit;
qx_temperature3: TcxTextEdit;
qx_temperature5: TcxTextEdit;
qx_UnpackingMethod: TcxTextEdit;
qx_speed: TcxTextEdit;
qx_ReduceAmplitude: TcxTextEdit;
2025-06-07 17:31:07 +08:00
Panel3: TPanel;
cxLabel1: TcxLabel;
cxLabel2: TcxLabel;
cxLabel21: TcxLabel;
cxLabel22: TcxLabel;
cxLabel23: TcxLabel;
cxLabel24: TcxLabel;
cxLabel25: TcxLabel;
cxLabel26: TcxLabel;
cxLabel27: TcxLabel;
cxLabel28: TcxLabel;
cxLabel3: TcxLabel;
cxLabel4: TcxLabel;
cxLabel5: TcxLabel;
cxLabel55: TcxLabel;
cxLabel56: TcxLabel;
cxLabel57: TcxLabel;
cxLabel58: TcxLabel;
cxLabel59: TcxLabel;
cxLabel6: TcxLabel;
cxLabel60: TcxLabel;
cxLabel61: TcxLabel;
cxLabel62: TcxLabel;
cxLabel63: TcxLabel;
cxLabel64: TcxLabel;
cxLabel65: TcxLabel;
2025-06-10 17:34:06 +08:00
dx_OutFanSpeed: TcxTextEdit;
dx_temperature1: TcxTextEdit;
dx_WidthAmplitude: TcxTextEdit;
dx_temperature5: TcxTextEdit;
dx_temperature9: TcxTextEdit;
dx_UnpackingMethod: TcxTextEdit;
dx_OpenAmplitude: TcxTextEdit;
dx_RosePower: TcxTextEdit;
dx_RollMethod: TcxTextEdit;
dx_BrushSuperRate: TcxTextEdit;
dx_Precautions: TcxTextEdit;
dx_UpSuperRate: TcxTextEdit;
dx_speed: TcxTextEdit;
dx_TubePress: TcxTextEdit;
dx_temperature6: TcxTextEdit;
dx_CycleFanSpeed: TcxTextEdit;
dx_DownSuperRate: TcxTextEdit;
dx_temperature3: TcxTextEdit;
dx_temperature4: TcxTextEdit;
dx_temperature7: TcxTextEdit;
dx_temperature8: TcxTextEdit;
dx_temperature10: TcxTextEdit;
dx_temperature2: TcxTextEdit;
2025-06-07 17:31:07 +08:00
Panel4: TPanel;
cxLabel100: TcxLabel;
cxLabel101: TcxLabel;
cxLabel102: TcxLabel;
cxLabel103: TcxLabel;
cxLabel104: TcxLabel;
cxLabel105: TcxLabel;
cxLabel106: TcxLabel;
cxLabel109: TcxLabel;
cxLabel110: TcxLabel;
cxLabel111: TcxLabel;
cxLabel82: TcxLabel;
cxLabel83: TcxLabel;
cxLabel84: TcxLabel;
cxLabel85: TcxLabel;
cxLabel86: TcxLabel;
cxLabel87: TcxLabel;
cxLabel88: TcxLabel;
cxLabel89: TcxLabel;
cxLabel90: TcxLabel;
cxLabel91: TcxLabel;
cxLabel92: TcxLabel;
cxLabel93: TcxLabel;
cxLabel94: TcxLabel;
cxLabel95: TcxLabel;
cxLabel96: TcxLabel;
cxLabel97: TcxLabel;
cxLabel98: TcxLabel;
cxLabel99: TcxLabel;
2025-06-10 17:34:06 +08:00
fs_OutFanSpeed: TcxTextEdit;
fs_temperature1: TcxTextEdit;
fs_WidthAmplitude: TcxTextEdit;
fs_temperature5: TcxTextEdit;
fs_temperature9: TcxTextEdit;
fs_UnpackingMethod: TcxTextEdit;
fs_OpenAmplitude: TcxTextEdit;
fs_RosePower: TcxTextEdit;
fs_RollMethod: TcxTextEdit;
fs_BrushSuperRate: TcxTextEdit;
fs_Precautions: TcxTextEdit;
fs_UpSuperRate: TcxTextEdit;
fs_speed: TcxTextEdit;
fs_TubePress: TcxTextEdit;
fs_temperature6: TcxTextEdit;
fs_CycleFanSpeed: TcxTextEdit;
fs_DownSuperRate: TcxTextEdit;
fs_temperature3: TcxTextEdit;
fs_temperature4: TcxTextEdit;
fs_temperature7: TcxTextEdit;
fs_temperature8: TcxTextEdit;
fs_temperature10: TcxTextEdit;
fs_temperature2: TcxTextEdit;
fs_CarPress: TcxTextEdit;
fs_PressWaterContent: TcxTextEdit;
2025-06-07 17:31:07 +08:00
Panel5: TPanel;
cxLabel107: TcxLabel;
cxLabel108: TcxLabel;
cxLabel112: TcxLabel;
cxLabel29: TcxLabel;
cxLabel30: TcxLabel;
cxLabel31: TcxLabel;
cxLabel32: TcxLabel;
cxLabel33: TcxLabel;
cxLabel34: TcxLabel;
cxLabel35: TcxLabel;
cxLabel36: TcxLabel;
cxLabel49: TcxLabel;
cxLabel50: TcxLabel;
cxLabel51: TcxLabel;
cxLabel52: TcxLabel;
cxLabel53: TcxLabel;
cxLabel54: TcxLabel;
cxLabel66: TcxLabel;
cxLabel67: TcxLabel;
cxLabel68: TcxLabel;
cxLabel69: TcxLabel;
cxLabel70: TcxLabel;
cxLabel71: TcxLabel;
cxLabel72: TcxLabel;
cxLabel73: TcxLabel;
cxLabel74: TcxLabel;
cxLabel75: TcxLabel;
cxLabel76: TcxLabel;
cxLabel77: TcxLabel;
cxLabel78: TcxLabel;
cxLabel79: TcxLabel;
cxLabel80: TcxLabel;
cxLabel81: TcxLabel;
2025-06-10 17:34:06 +08:00
fp_OutFanSpeed: TcxTextEdit;
fp_temperature1: TcxTextEdit;
fp_WidthAmplitude: TcxTextEdit;
fp_temperature5: TcxTextEdit;
fp_temperature9: TcxTextEdit;
fp_UnpackingMethod: TcxTextEdit;
fp_OpenAmplitude: TcxTextEdit;
fp_RosePower: TcxTextEdit;
fp_RollMethod: TcxTextEdit;
fp_BrushSuperRate: TcxTextEdit;
fp_Precautions: TcxTextEdit;
fp_UpSuperRate: TcxTextEdit;
fp_speed: TcxTextEdit;
fp_TubePress: TcxTextEdit;
fp_temperature6: TcxTextEdit;
fp_CycleFanSpeed: TcxTextEdit;
fp_DownSuperRate: TcxTextEdit;
fp_temperature3: TcxTextEdit;
fp_temperature4: TcxTextEdit;
fp_temperature7: TcxTextEdit;
fp_temperature8: TcxTextEdit;
fp_temperature10: TcxTextEdit;
fp_temperature2: TcxTextEdit;
fp_LeftHeight: TcxTextEdit;
fp_RightHeight: TcxTextEdit;
fp_PumbMixElectricFrequency: TcxTextEdit;
fp_SystemPress: TcxTextEdit;
fp_MixElectricFrequency: TcxTextEdit;
fp_GasFlow: TcxTextEdit;
2025-06-07 17:31:07 +08:00
Panel6: TPanel;
cxLabel116: TcxLabel;
cxLabel117: TcxLabel;
cxLabel118: TcxLabel;
cxLabel119: TcxLabel;
cxLabel120: TcxLabel;
cxLabel121: TcxLabel;
cxLabel122: TcxLabel;
cxLabel123: TcxLabel;
cxLabel124: TcxLabel;
cxLabel125: TcxLabel;
cxLabel126: TcxLabel;
cxLabel127: TcxLabel;
cxLabel128: TcxLabel;
cxLabel129: TcxLabel;
cxLabel130: TcxLabel;
cxLabel131: TcxLabel;
cxLabel132: TcxLabel;
cxLabel133: TcxLabel;
cxLabel134: TcxLabel;
cxLabel135: TcxLabel;
cxLabel136: TcxLabel;
cxLabel137: TcxLabel;
cxLabel138: TcxLabel;
cxLabel139: TcxLabel;
cxLabel140: TcxLabel;
cxLabel141: TcxLabel;
cxLabel142: TcxLabel;
cxLabel143: TcxLabel;
2025-06-10 17:34:06 +08:00
gj_temperature1: TcxTextEdit;
gj_WidthAmplitude: TcxTextEdit;
gj_temperature5: TcxTextEdit;
gj_temperature9: TcxTextEdit;
gj_UnpackingMethod: TcxTextEdit;
gj_OpenAmplitude: TcxTextEdit;
gj_RosePower: TcxTextEdit;
gj_RollMethod: TcxTextEdit;
gj_BrushSuperRate: TcxTextEdit;
gj_Precautions: TcxTextEdit;
gj_UpSuperRate: TcxTextEdit;
gj_speed: TcxTextEdit;
gj_TubePress: TcxTextEdit;
gj_temperature6: TcxTextEdit;
gj_CycleFanSpeed: TcxTextEdit;
gj_DownSuperRate: TcxTextEdit;
gj_temperature3: TcxTextEdit;
gj_temperature4: TcxTextEdit;
gj_temperature7: TcxTextEdit;
gj_temperature8: TcxTextEdit;
gj_temperature10: TcxTextEdit;
gj_temperature2: TcxTextEdit;
gj_LeftHeight: TcxTextEdit;
gj_RightHeight: TcxTextEdit;
gj_OutFanSpeed: TcxTextEdit;
2025-06-11 09:07:37 +08:00
cxtabsheet7: TcxTabSheet;
2025-06-10 17:34:06 +08:00
cxLabel113: TcxLabel;
cxLabel114: TcxLabel;
F_FinishLongitudeDensity: TcxTextEdit;
F_FinishLatitudeDensity: TcxTextEdit;
panel7: TPanel;
cxLabel115: TcxLabel;
cxLabel144: TcxLabel;
cxLabel145: TcxLabel;
cxLabel146: TcxLabel;
cxLabel147: TcxLabel;
cxLabel154: TcxLabel;
cxLabel155: TcxLabel;
cxLabel156: TcxLabel;
zm_RollMethod: TcxTextEdit;
zm_inoutSpeed: TcxTextEdit;
zm_needle: TcxTextEdit;
zm_Precautions: TcxTextEdit;
zm_UnpackingMethod: TcxTextEdit;
zm_frequency: TcxTextEdit;
zm_wagCloth: TcxTextEdit;
zm_WidthAmplitude: TcxTextEdit;
cxLabel148: TcxLabel;
qx_Add_Number: TcxTextEdit;
cxLabel149: TcxLabel;
cxLabel150: TcxLabel;
C_Code: TcxTextEdit;
2025-06-11 09:07:37 +08:00
GPM_2: TcxGridPopupMenu;
DS_2: TDataSource;
cds_2: TClientDataSet;
GPM_3: TcxGridPopupMenu;
DS_3: TDataSource;
CDS_3: TClientDataSet;
Tv3Column1: TcxGridDBColumn;
Tv1Column1: TcxGridDBColumn;
Tv2Column1: TcxGridDBColumn;
cxGrid4: TcxGrid;
TV4: TcxGridDBTableView;
cxGridDBColumn1: TcxGridDBColumn;
cxGridDBColumn2: TcxGridDBColumn;
cxGridDBColumn11: TcxGridDBColumn;
cxGridLevel4: TcxGridLevel;
Panel8: TPanel;
Panel9: TPanel;
Label20: TLabel;
cxGridPopupMenu1: TcxGridPopupMenu;
DS_GX: TDataSource;
cds_gx: TClientDataSet;
Panel10: TPanel;
Panel11: TPanel;
Label1: TLabel;
ToolBar2: TToolBar;
ToolButton2: TToolButton;
ToolButton3: TToolButton;
ToolButton1: TToolButton;
ToolButton4: TToolButton;
ToolButton5: TToolButton;
ToolButton6: TToolButton;
ToolButton7: TToolButton;
2025-06-06 13:56:41 +08:00
procedure FormShow(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
2025-06-10 17:34:06 +08:00
procedure TbSaveClick(Sender: TObject);
2025-06-06 13:56:41 +08:00
procedure CYColorKeyPress(Sender: TObject; var Key: Char);
procedure CYJGGYBtnDnClick(Sender: TObject);
procedure C_WidthBtnDnClick(Sender: TObject);
procedure C_WidthBtnUpClick(Sender: TObject);
2025-06-10 17:34:06 +08:00
procedure TbUpFileClick(Sender: TObject);
2025-06-06 13:56:41 +08:00
procedure C_FromNameBtnUpClick(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure SetXH();
procedure ToolButton3Click(Sender: TObject);
procedure Tv1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
2025-06-11 09:07:37 +08:00
procedure ToolButton7Click(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure ToolButton4Click(Sender: TObject);
procedure ToolButton5Click(Sender: TObject);
procedure ToolButton6Click(Sender: TObject);
2025-06-06 13:56:41 +08:00
private
canshu1: string;
Fint: Integer;
procedure InitGrid();
2025-06-11 09:07:37 +08:00
procedure ArrangeTabsByDataset;
2025-06-06 13:56:41 +08:00
function SaveData(): Boolean;
{ Private declarations }
public
2025-06-10 17:34:06 +08:00
FBCIID, FCTID, FProcessID: string;
2025-06-06 13:56:41 +08:00
CopyInt: Integer;
{ Public declarations }
end;
var
frmClothInfoInput: TfrmClothInfoInput;
implementation
uses
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_ClothInfoSel;
{$R *.dfm}
procedure TfrmClothInfoInput.SetXH();
var
i: Integer;
begin
2025-06-11 09:07:37 +08:00
with CDS_GX do
2025-06-06 13:56:41 +08:00
begin
First;
i := 1;
while not Eof do
begin
2025-06-11 09:07:37 +08:00
with CDS_GX do
2025-06-06 13:56:41 +08:00
begin
Edit;
FieldByName('XHNoTemp').Value := i;
Post;
end;
i := i + 1;
Next;
end;
end;
2025-06-11 09:07:37 +08:00
with CDS_GX do
2025-06-06 13:56:41 +08:00
begin
2025-06-11 09:07:37 +08:00
CDS_GX.IndexFieldNames := '';
2025-06-06 13:56:41 +08:00
First;
i := 1;
while not Eof do
begin
2025-06-11 09:07:37 +08:00
with CDS_GX do
2025-06-06 13:56:41 +08:00
begin
Edit;
FieldByName('SerialNo').Value := FieldByName('XHNoTemp').AsInteger;
Post;
end;
i := i + 1;
Next;
end;
2025-06-11 09:07:37 +08:00
CDS_GX.IndexFieldNames := 'SerialNo';
2025-06-06 13:56:41 +08:00
end;
end;
2025-06-11 09:07:37 +08:00
procedure TfrmClothInfoInput.ArrangeTabsByDataset;
var
I: Integer;
TabSheet: TcxTabSheet;
CurrentIndex: Integer;
begin
// <20>̶<EFBFBD><CCB6><EFBFBD>һ<EFBFBD><D2BB>ҳ<EFBFBD><D2B3> A
cxTabSheet1.PageIndex := 0;
cxTabSheet1.Visible := True;
// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3>
for I := 1 to cxPageControl1.PageCount - 1 do
cxPageControl1.Pages[I].TabVisible := False;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD><DDBC>Ƿ񼤻<C7B7>
if not (CDS_GX.Active and (CDS_GX.RecordCount > 0)) then
Exit;
// <20><><EFBFBD>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>ʼ<EFBFBD><CABC>0<EFBFBD>ѱ<EFBFBD>Aռ<41>ã<EFBFBD>
CurrentIndex := 1;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>
CDS_GX.IndexFieldNames := 'serialno';
CDS_GX.First;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD><DDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3>
while not CDS_GX.Eof do
begin
// <20><><EFBFBD>ݹ<EFBFBD><DDB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD>Ӧ<EFBFBD><D3A6>ҳ<EFBFBD><D2B3>
for I := 0 to cxPageControl1.PageCount - 1 do
begin
TabSheet := cxPageControl1.Pages[I] as TcxTabSheet;
// ƥ<><EFBFBD><E4B9A4><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2>ǵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD>̶<EFBFBD>ҳ<EFBFBD><D2B3>
if (Trim(TabSheet.Caption) = CDS_GX.FieldByName('gxname').AsString) and (TabSheet <> cxTabSheet1) then
begin
TabSheet.PageIndex := CurrentIndex;
TabSheet.TabVisible := True;
Inc(CurrentIndex);
Break;
end;
end;
CDS_GX.Next;
end;
// ˢ<><CBA2>ҳ<EFBFBD><D2B3><EFBFBD>ؼ<EFBFBD>
cxPageControl1.Invalidate;
end;
2025-06-06 13:56:41 +08:00
procedure TfrmClothInfoInput.InitGrid();
2025-06-11 09:07:37 +08:00
var
i: integer;
2025-06-06 13:56:41 +08:00
begin
with ADOQueryTemp do
begin
Close;
SQL.Clear;
2025-06-11 09:07:37 +08:00
SQL.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
2025-06-06 13:56:41 +08:00
Open;
end;
2025-06-10 17:34:06 +08:00
SCSHData(ADOQueryTemp, panel1, 2);
SCSHData(ADOQueryTemp, Panel1, 0);
2025-06-06 13:56:41 +08:00
with ADOQueryTemp do
begin
Close;
SQL.Clear;
2025-06-11 09:07:37 +08:00
SQL.Add('select * from Bs_Cloth_GY_Main where BCIID=''' + Trim(FBCIID) + '''');
Open;
end;
SCSHData(ADOQueryTemp, Panel2, 2);
SCSHData(ADOQueryTemp, Panel3, 2);
SCSHData(ADOQueryTemp, Panel4, 2);
SCSHData(ADOQueryTemp, Panel5, 2);
SCSHData(ADOQueryTemp, Panel6, 2);
SCSHData(ADOQueryTemp, Panel7, 2);
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select A.* from Bs_Cloth_GY_sub A ');
sql.Add(' where gytype=''<27><>ˮ'' and A.BCIID=''' + Trim(FBCIID) + '''');
2025-06-06 13:56:41 +08:00
Open;
end;
SCreateCDS(ADOQueryTemp, CDS_1);
SInitCDSData(ADOQueryTemp, CDS_1);
2025-06-11 09:07:37 +08:00
if ADOQueryTemp.IsEmpty then
begin
for i := 0 to 3 do
begin
CDS_1.Append;
CDS_1.FieldByName('serialno').Value := i + 1;
CDS_1.posT;
end;
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select A.* from Bs_Cloth_GY_sub A ');
sql.Add(' where gytype=''<27><><EFBFBD><EFBFBD>'' and A.BCIID=''' + Trim(FBCIID) + '''');
Open;
end;
SCreateCDS(ADOQueryTemp, CDS_2);
SInitCDSData(ADOQueryTemp, CDS_2);
if ADOQueryTemp.IsEmpty then
begin
for i := 0 to 7 do
begin
CDS_2.Append;
CDS_2.FieldByName('serialno').Value := i + 1;
CDS_2.posT;
end;
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select A.* from Bs_Cloth_GY_sub A ');
sql.Add(' where gytype=''<27>ν<EFBFBD>'' and A.BCIID=''' + Trim(FBCIID) + '''');
Open;
end;
SCreateCDS(ADOQueryTemp, CDS_3);
SInitCDSData(ADOQueryTemp, CDS_3);
if ADOQueryTemp.IsEmpty then
begin
for i := 0 to 7 do
begin
CDS_3.Append;
CDS_3.FieldByName('serialno').Value := i + 1;
CDS_3.posT;
end;
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select A.* from Bs_Cloth_GX A ');
sql.Add(' where A.BCIID=''' + Trim(FBCIID) + '''');
Open;
end;
SCreateCDS(ADOQueryTemp, CDS_GX);
SInitCDSData(ADOQueryTemp, CDS_GX);
// C_FromName.TxtCode := Trim(ADOQueryTemp.fieldbyname('FromBCIID').AsString);
// C_FromName.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName').AsString);
2025-06-06 13:56:41 +08:00
end;
procedure TfrmClothInfoInput.FormShow(Sender: TObject);
begin
InitGrid();
2025-06-11 09:07:37 +08:00
ArrangeTabsByDataset;
2025-06-10 17:34:06 +08:00
// if CopyInt = 1 then
// begin
// FBCIID := '';
// BCIID.text := '';
// C_Code.text := '';
// end;
2025-06-06 13:56:41 +08:00
end;
procedure TfrmClothInfoInput.TBCloseClick(Sender: TObject);
begin
Close;
end;
function TfrmClothInfoInput.SaveData(): Boolean;
var
2025-06-10 17:34:06 +08:00
MaxBCIID, MaxProcessID, MaxBCPID: string;
2025-06-11 09:07:37 +08:00
Maxid1, maxid2, maxid3, maxgx: string;
2025-06-06 13:56:41 +08:00
begin
try
ADOQueryCmd.Connection.BeginTrans;
//////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //////////////////////
if Trim(FBCIID) = '' then
begin
if GetLSNo(ADOQueryCmd, MaxBCIID, 'Y', 'BS_Cloth_Info', 4, 1) = False then
begin
Result := False;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox(<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
Exit;
end;
end
else
begin
MaxBCIID := Trim(FBCIID);
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(FBCIID) = '' then
begin
Append;
FieldByName('CTID').Value := Trim(FCTID);
FieldByName('FILLID').Value := Trim(DCode);
FieldByName('FILLER').Value := Trim(DName);
FieldByName('FILLTIME').Value := SGetServerDateTime(ADOQueryTemp);
end
else
begin
Edit;
FieldByName('EDITER').Value := Trim(DName);
FieldByName('EDITTIME').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('BCIID').Value := Trim(MaxBCIID);
if trim(C_Code.Text) = '' then
C_Code.Text := Trim(MaxBCIID);
2025-06-10 17:34:06 +08:00
RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', panel1, 2);
2025-06-06 13:56:41 +08:00
Post;
end;
2025-06-10 17:34:06 +08:00
// with ADOQueryCmd do
// begin
// Close;
// SQL.Clear;
// sql.Add('delete BS_Cloth_Info_Link where ToID=''' + Trim(MaxBCIID) + '''');
// ExecSQL;
// end;
// with ADOQueryCmd do
// begin
// Close;
// SQL.Clear;
// sql.Add('select * from BS_Cloth_Info_Link where 1=2');
// Open;
// end;
// with ADOQueryCmd do
// begin
// Append;
// FieldByName('ToID').Value := Trim(MaxBCIID);
// FieldByName('FromID').Value := Trim(C_FromName.TxtCode);
// Post;
// end;
2025-06-06 13:56:41 +08:00
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select count(*) as AA from BS_Cloth_Info where C_Code=''' + Trim(C_Code.Text) + '''');
Open;
if FieldByName('AA').AsInteger > 1 then
begin
ADOQueryCmd.Connection.RollbackTrans;
Result := False;
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>', '<27><>ʾ', 0);
Exit;
end;
end;
2025-06-10 17:34:06 +08:00
with ADOQueryCmd do
begin
Close;
SQL.Clear;
2025-06-11 09:07:37 +08:00
sql.Add('select * from Bs_Cloth_GY_Main where BCIID=''' + Trim(FBCIID) + '''');
2025-06-10 17:34:06 +08:00
Open;
end;
with ADOQueryCmd do
begin
2025-06-11 09:07:37 +08:00
if Trim(FBCIID) = '' then
begin
Append;
2025-06-10 17:34:06 +08:00
2025-06-11 09:07:37 +08:00
end
else
begin
Edit;
2025-06-10 17:34:06 +08:00
2025-06-11 09:07:37 +08:00
end;
FieldByName('BCIID').Value := Trim(MaxBCIID);
2025-06-10 17:34:06 +08:00
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel2, 2);
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel3, 2);
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel4, 2);
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel5, 2);
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel6, 2);
RTSetsavedata(ADOQueryCmd, 'Bs_Cloth_GY_Main', panel7, 2);
Post;
end;
2025-06-06 13:56:41 +08:00
//////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> //////////////////////
///
2025-06-11 09:07:37 +08:00
///
///
///
/// ///////////////// <20><><EFBFBD><EFBFBD><E6B9A4><EFBFBD>ӱ<EFBFBD> //////////////////////
with CDS_GX do
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
begin
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox(<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
Exit;
end;
end
else
begin
maxgx := Trim(CDS_GX.fieldbyname('GXID').AsString);
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from Bs_Cloth_GX where ');
sql.Add(' GXID=''' + Trim(maxgx) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(CDS_GX.fieldbyname('GXID').AsString) = '' then
begin
Append;
end
else
begin
Edit;
end;
FieldByName('BCIID').Value := Trim(MaxBCIID);
FieldByName('GXID').Value := Trim(maxgx);
RTSetSaveDataCDS(ADOQueryCmd, Tv4, CDS_GX, 'Bs_Cloth_GX', 0);
Post;
end;
CDS_GX.Edit;
CDS_GX.FieldByName('BCIID').Value := Trim(MaxBCIID);
CDS_GX.FieldByName('GXID').Value := Trim(maxgx);
Next;
end;
end;
//////////////// <20><><EFBFBD><EFBFBD><E6B9A4><EFBFBD>ӱ<EFBFBD> //////////////////////
////////////////// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD>ӱ<EFBFBD> //////////////////////
2025-06-06 13:56:41 +08:00
with CDS_1 do
begin
First;
while not Eof do
begin
if Trim(CDS_1.fieldbyname('BCPID').AsString) = '' then
begin
2025-06-11 09:07:37 +08:00
if GetLSNo(ADOQueryTemp, Maxid1, 'FS', 'Bs_Cloth_GY_Sub', 5, 1) = False then
2025-06-06 13:56:41 +08:00
begin
ADOQueryCmd.Connection.RollbackTrans;
2025-06-11 09:07:37 +08:00
Application.MessageBox(<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
2025-06-06 13:56:41 +08:00
Exit;
end;
end
else
begin
2025-06-11 09:07:37 +08:00
Maxid1 := Trim(CDS_1.fieldbyname('BCPID').AsString);
2025-06-06 13:56:41 +08:00
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
2025-06-11 09:07:37 +08:00
sql.Add('select * from Bs_Cloth_GY_Sub where ');
sql.Add(' BCPID=''' + Trim(Maxid1) + '''');
2025-06-06 13:56:41 +08:00
Open;
end;
with ADOQueryCmd do
begin
2025-06-11 09:07:37 +08:00
if Trim(CDS_1.fieldbyname('BCPID').AsString) = '' then
begin
Append;
end
2025-06-06 13:56:41 +08:00
else
2025-06-11 09:07:37 +08:00
begin
2025-06-06 13:56:41 +08:00
Edit;
2025-06-11 09:07:37 +08:00
end;
FieldByName('GYType').Value := '<27><>ˮ';
FieldByName('BCIID').Value := Trim(MaxBCIID);
FieldByName('BCPID').Value := Trim(Maxid1);
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_1, 'Bs_Cloth_GY_Sub', 0);
2025-06-06 13:56:41 +08:00
Post;
end;
2025-06-11 09:07:37 +08:00
CDS_1.Edit;
CDS_1.FieldByName('BCIID').Value := Trim(MaxBCIID);
CDS_1.FieldByName('BCPID').Value := Trim(Maxid1);
Next;
end;
end;
//////////////// <20><><EFBFBD><EFBFBD><EFBFBD>ӱ<EFBFBD> //////////////////////
////////////////// <20><><EFBFBD><EFBFBD><E6B7A2><EFBFBD>ӱ<EFBFBD> //////////////////////
with CDS_2 do
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
begin
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox(<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
Exit;
end;
end
else
begin
maxid2 := Trim(CDS_2.fieldbyname('BCPID').AsString);
end;
with ADOQueryCmd do
2025-06-06 13:56:41 +08:00
begin
2025-06-11 09:07:37 +08:00
Close;
SQL.Clear;
sql.Add('select * from Bs_Cloth_GY_Sub where ');
sql.Add(' BCPID=''' + Trim(maxid2) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(CDS_2.fieldbyname('BCPID').AsString) = '' then
begin
Append;
end
else
begin
Edit;
end;
FieldByName('GYType').Value := '<27><><EFBFBD><EFBFBD>';
FieldByName('BCIID').Value := Trim(MaxBCIID);
FieldByName('BCPID').Value := Trim(maxid2);
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_2, 'Bs_Cloth_GY_Sub', 0);
2025-06-06 13:56:41 +08:00
Post;
end;
2025-06-11 09:07:37 +08:00
CDS_2.Edit;
CDS_2.FieldByName('BCIID').Value := Trim(MaxBCIID);
CDS_2.FieldByName('BCPID').Value := Trim(maxid2);
2025-06-06 13:56:41 +08:00
Next;
end;
end;
2025-06-11 09:07:37 +08:00
//////////////// <20><><EFBFBD><EFBFBD><E6B7A2><EFBFBD>ӱ<EFBFBD> //////////////////////
2025-06-06 13:56:41 +08:00
///
2025-06-11 09:07:37 +08:00
/// ////////////////// <20><><EFBFBD><EFBFBD><EFBFBD>ν<EFBFBD><CEBD>ӱ<EFBFBD> //////////////////////
with CDS_3 do
begin
First;
while not Eof do
begin
if Trim(CDS_3.fieldbyname('BCPID').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, maxid3, 'GJ', 'Bs_Cloth_GY_Sub', 5, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox(<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE>ʧ<EFBFBD>ܣ<EFBFBD>', '<27><>ʾ', 0);
Exit;
end;
end
else
begin
maxid3 := Trim(CDS_3.fieldbyname('BCPID').AsString);
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from Bs_Cloth_GY_Sub where ');
sql.Add(' BCPID=''' + Trim(maxid3) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(CDS_3.fieldbyname('BCPID').AsString) = '' then
begin
Append;
end
else
begin
Edit;
end;
FieldByName('GYType').Value := '<27>ν<EFBFBD>';
FieldByName('BCIID').Value := Trim(MaxBCIID);
FieldByName('BCPID').Value := Trim(maxid3);
RTSetSaveDataCDS(ADOQueryCmd, Tv3, CDS_3, 'Bs_Cloth_GY_Sub', 0);
Post;
end;
CDS_3.Edit;
CDS_3.FieldByName('BCIID').Value := Trim(MaxBCIID);
CDS_3.FieldByName('BCPID').Value := Trim(maxid3);
Next;
end;
end;
//////////////// <20><><EFBFBD><EFBFBD><E6B7A2><EFBFBD>ӱ<EFBFBD> //////////////////////
2025-06-06 13:56:41 +08:00
ADOQueryCmd.Connection.CommitTrans;
FBCIID := MaxBCIID;
Result := True;
except
Result := False;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!', '<27><>ʾ', 0);
end;
end;
procedure TfrmClothInfoInput.CYJGGYBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
end;
2025-06-10 17:34:06 +08:00
procedure TfrmClothInfoInput.TbSaveClick(Sender: TObject);
2025-06-06 13:56:41 +08:00
var
MC_Code: string;
begin
if C_Name.Text = '' then
begin
Application.MessageBox('<27><>Ʒ<EFBFBD><C6B7><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>', '<27><>ʾ', 0);
Exit;
end;
2025-06-10 17:34:06 +08:00
// if trim(C_Code.Text) = '' then
// begin
//
// if GetLSNo(ADOQueryCmd, MC_Code, 'C', 'BS_Cloth_Info', 4, 0) = False then
// begin
// Application.MessageBox('ȡ<><C8A1><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!', '<27><>ʾ', 0);
// Exit;
// end;
// C_Code.Text := MC_Code;
//
// end;
2025-06-11 09:07:37 +08:00
// SetXH();
2025-06-06 13:56:41 +08:00
if SaveData() then
begin
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD>', '<27><>ʾ', 0);
ModalResult := 1;
end;
end;
2025-06-11 09:07:37 +08:00
procedure TfrmClothInfoInput.ToolButton1Click(Sender: TObject);
var
i: Integer;
begin
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
i := i + 1;
// CopyAddRow(Tv1, CDS_1);
with CDS_GX do
begin
Append;
FieldByName('SerialNo').Value := i;
FieldByName('GXName').Value := '<27><>ˮ';
Post;
end;
SetXH();
ArrangeTabsByDataset;
end;
2025-06-06 13:56:41 +08:00
procedure TfrmClothInfoInput.ToolButton2Click(Sender: TObject);
var
i: Integer;
begin
2025-06-11 09:07:37 +08:00
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
2025-06-06 13:56:41 +08:00
i := i + 1;
2025-06-10 17:34:06 +08:00
// CopyAddRow(Tv1, CDS_1);
2025-06-11 09:07:37 +08:00
with CDS_GX do
2025-06-06 13:56:41 +08:00
begin
2025-06-11 09:07:37 +08:00
Append;
2025-06-06 13:56:41 +08:00
FieldByName('SerialNo').Value := i;
2025-06-11 09:07:37 +08:00
FieldByName('GXName').Value := '<27><>ϴ';
2025-06-06 13:56:41 +08:00
Post;
end;
SetXH();
2025-06-11 09:07:37 +08:00
ArrangeTabsByDataset;
2025-06-06 13:56:41 +08:00
end;
procedure TfrmClothInfoInput.ToolButton3Click(Sender: TObject);
2025-06-11 09:07:37 +08:00
var
i: Integer;
begin
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
i := i + 1;
// CopyAddRow(Tv1, CDS_1);
with CDS_GX do
begin
Append;
FieldByName('SerialNo').Value := i;
FieldByName('GXName').Value := '<27><><EFBFBD><EFBFBD>';
Post;
end;
SetXH();
ArrangeTabsByDataset;
end;
procedure TfrmClothInfoInput.ToolButton4Click(Sender: TObject);
var
i: Integer;
begin
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
i := i + 1;
// CopyAddRow(Tv1, CDS_1);
with CDS_GX do
begin
Append;
FieldByName('SerialNo').Value := i;
FieldByName('GXName').Value := '<27><><EFBFBD><EFBFBD>';
Post;
end;
SetXH();
ArrangeTabsByDataset;
end;
procedure TfrmClothInfoInput.ToolButton5Click(Sender: TObject);
var
i: Integer;
begin
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
i := i + 1;
// CopyAddRow(Tv1, CDS_1);
with CDS_GX do
begin
Append;
FieldByName('SerialNo').Value := i;
FieldByName('GXName').Value := '<27>ν<EFBFBD>';
Post;
end;
SetXH();
ArrangeTabsByDataset;
end;
procedure TfrmClothInfoInput.ToolButton6Click(Sender: TObject);
var
i: Integer;
begin
i := CDS_GX.RecordCount; //<2F><>ǰ<EFBFBD><C7B0>dataset<65>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>м<EFBFBD>¼
i := i + 1;
// CopyAddRow(Tv1, CDS_1);
with CDS_GX do
begin
Append;
FieldByName('SerialNo').Value := i;
FieldByName('GXName').Value := '<27><>ë';
Post;
end;
SetXH();
ArrangeTabsByDataset;
end;
procedure TfrmClothInfoInput.ToolButton7Click(Sender: TObject);
2025-06-06 13:56:41 +08:00
begin
2025-06-11 09:07:37 +08:00
if CDS_GX.IsEmpty then
2025-06-06 13:56:41 +08:00
Exit;
if Application.MessageBox(<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '<27><>ʾ', 32 + 4) <> IDYES then
Exit;
2025-06-11 09:07:37 +08:00
if Trim(CDS_GX.fieldbyname('GXID').AsString) <> '' then
2025-06-06 13:56:41 +08:00
begin
with ADOQueryCmd do
begin
Close;
sql.Clear;
2025-06-11 09:07:37 +08:00
sql.Add('delete Bs_Cloth_GX where GXID=''' + Trim(CDS_GX.fieldbyname('GXID').AsString) + '''');
2025-06-06 13:56:41 +08:00
ExecSQL;
end;
end;
2025-06-11 09:07:37 +08:00
CDS_GX.Delete;
2025-06-06 13:56:41 +08:00
SetXH();
2025-06-11 09:07:37 +08:00
ArrangeTabsByDataset;
2025-06-06 13:56:41 +08:00
end;
procedure TfrmClothInfoInput.C_FromNameBtnUpClick(Sender: TObject);
begin
2025-06-10 17:34:06 +08:00
// try
// frmClothInfoSel := TfrmClothInfoSel.Create(Application);
// with frmClothInfoSel do
// begin
// FCTType := '<27><><EFBFBD><EFBFBD>';
// if ShowModal = 1 then
// begin
// C_FromName.TxtCode := Trim(CDS_1.fieldbyname('BCIID').AsString);
// C_FromName.Text := Trim(CDS_1.fieldbyname('C_Name').AsString);
// end;
// end;
// finally
// frmClothInfoSel.Free;
// end;
2025-06-06 13:56:41 +08:00
end;
procedure TfrmClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then
begin
Key := #0;
SelectNext(ActiveControl as TWinControl, True, True);
end;
end;
procedure TfrmClothInfoInput.C_WidthBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmClothInfoInput.C_WidthBtnUpClick(Sender: TObject);
var
fsj: string;
FWZ: Integer;
begin
fsj := Trim(TEdit(Sender).Hint);
FWZ := Pos('/', fsj);
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := Copy(fsj, 1, FWZ - 1);
flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ);
if ShowModal = 1 then
begin
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
2025-06-10 17:34:06 +08:00
procedure TfrmClothInfoInput.TbUpFileClick(Sender: TObject);
2025-06-06 13:56:41 +08:00
begin
2025-06-10 17:34:06 +08:00
// if trim(C_Code.Text) = '' then
// Exit;
// try
// frmAttachmentUpload := TfrmAttachmentUpload.Create(Application);
// with frmAttachmentUpload do
// begin
// FEditAuthority := True;
// fkeyNO := trim(C_Code.Text);
// fType := '<27><>ƷƷ<C6B7><C6B7><EFBFBD><EFBFBD>';
// if ShowModal = 1 then
// begin
//
// end;
// end;
// finally
// frmAttachmentUpload.Free;
// end;
2025-06-06 13:56:41 +08:00
end;
procedure TfrmClothInfoInput.Tv1Column1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
2025-06-10 17:34:06 +08:00
// try
// frmZDYHelp := TfrmZDYHelp.Create(Application);
// with frmZDYHelp do
// begin
// flag := 'FtyType';
// flagname := '<27><><EFBFBD><EFBFBD>';
// if ShowModal = 1 then
// begin
// CDS_1.Edit;
// CDS_1.fieldbyname('FtyType').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
// CDS_1.Post;
// end;
// end;
// finally
// frmZDYHelp.Free;
// end;
// tv1.Controller.EditingController.ShowEdit();
2025-06-06 13:56:41 +08:00
end;
end.